自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(117)
  • 收藏
  • 关注

原创 vue界面传值(子父组件)

父组件<template> <div> <div class="rootViewstyle"> <titleview model="1123" @touch="touchbtn"></titleview> </div> </div></template><script> import titleview from "./

2017-09-15 15:18:19 1193

原创 关于分段均分计算

获取最大值 进行分段处理func getmax(number: Double) -> Double { var max = 0.0 let temp = number * 10 while temp > max { max += 3 } return max / 10}getmax(number: 4)

2017-09-05 11:03:37 701

原创 modified content

今天提交iMessage项目到github上执行git status遇到报错(如下图)试了半天没试出来 后来还是度娘一下找到答案: 在被提交的文件夹下面有 .git 隐藏文件导致无法提交;解决办法删掉即可。

2017-08-01 13:44:27 1993

原创 简单图文混排swift

//需求 邱学伟是大帅哥(加个笑脸图片) 邱学伟:红色背景绿色字体加粗显示 是:蓝色字体 10号小字体 大帅哥:灰色42号字体 fileprivate func FuWenBenDemo() { //定义富文本即有格式的字符串 let attributedStrM : NSMutableAttributedString = NSMutableAttributedSt

2017-08-01 13:38:27 614

原创 手机端rem适配设置

web适配手机端尺寸创建rem.js文件将一下代码拷贝到文件(function(doc, win) { var docEl = doc.documentElement, resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize', recalc = function() {

2017-07-28 16:30:53 489

原创 realm创建本地数据库

do { let config = Realm.Configuration().fileURL?.deletingLastPathComponent().appendingPathComponent("TeachersDefault.realm") ?? URL(fileURLWithPath: "") self.realm = try Realm

2017-06-10 18:24:01 504

原创 swift 高清截图 ScrollView截图

extension UIScrollView { var capture: UIImage? { var image: UIImage? = nil UIGraphicsBeginImageContext(self.contentSize) do { let savedContentOffset = self.content

2017-05-20 11:15:50 1718

原创 关于RxSwift MVVM flatMapLatest 点击事件网络请求失败整个序列结束

例子 先上代码吧:self.signedIn = input.loginTaps.withLatestFrom(usernameAndPassword) .flatMapLatest { (username, password) inreturn EmeAPI.sharedInstance.request(UserApi.login(loginName: usernam

2017-05-08 13:30:31 3140 3

原创 snpKit 关于自动布局

//// TRRateHeardView.swift// TREvaluation//// Created by Mr.H on 2017/4/25.// Copyright © 2017年 long. All rights reserved.//import UIKitclass TRRateHeardView: TSView { var array = [TRRate

2017-04-25 14:05:43 1968

原创 Git中.gitignore文件不起作用的解决

在Studio里使用Git管理代码的过程中,可以修改.gitignore文件中的标示的方法来忽略开发者想忽略掉的文件或目录,如果没有.gitignore文件,可以自己手工创建。在.gitignore文件中的每一行保存一个匹配的规则例如:# 此为注释 – 将被 Git 忽略*.a # 忽略所有 .a 结尾的文件!lib.a # 但 lib.a 除外/TODO # 仅仅忽略

2017-04-12 10:24:02 305

原创 Swift3.0中十六进制颜色转换UIColor

//给UIColor扩展extension UIColor { /// 用十六进制颜色创建UIColor /// /// - Parameter hexColor: 十六进制颜色 (0F0F0F) convenience init(hexColor: String) { // 存储转换后的数值 var red:UInt32 = 0, gre

2017-04-07 10:40:31 1361

原创 Navigator&正逆向传值&跳转动画&自定义Navigator

Navigatorimport React,{Component} from 'react';import { AppRegistry, StyleSheet, Text, View, Navigator,} from 'react-native';import Oneview from './oneview'export default class na

2017-03-30 12:02:00 1421

原创 TabBarIOS,TabBarIOS.Item

import React,{Component} from 'react';import { AppRegistry, StyleSheet, Text, View, TabBarIOS, AlertIOS,} from 'react-native';var one = 'https://img.alicdn.com/imgextra/i1/222

2017-03-30 10:04:48 1348

原创 轮播图简单实现

import React, {Component} from 'react';import { AppRegistry, StyleSheet, Text, View, ScrollView, Image, AlertIOS,} from 'react-native';var TimerMixin = require('react-timer

2017-03-29 17:36:37 474

原创 九宫格布局

import React,{Component} from 'react';import { AppRegistry, StyleSheet, Text, View, ListView, AlertIOS,} from 'react-native';var Dimensions = require('Dimensions');var width =

2017-03-29 13:43:11 393

原创 ListView 分组展示

import React, {Component} from 'react';import { AppRegistry, StyleSheet, Text, View, ListView, TouchableOpacity,} from 'react-native';// var Car = require('./Car.json');export

2017-03-29 11:29:45 432

原创 ListView

import React, { Component } from 'react';import { AppRegistry, StyleSheet, Text, View, ListView, TouchableOpacity, AlertIOS,} from 'react-native';var dataSources = ['1','1

2017-03-29 10:07:00 267

原创 TouchableOpacity

import React,{Component} from 'react';import { AppRegistry, StyleSheet, Text, View, TouchableOpacity, AlertIOS,} from 'react-native';class test1 extends Component{ state =

2017-03-27 11:51:38 1527

原创 获取当前屏幕的宽高和像素点

import React, {Component} from 'react';import { AppRegistry,//注册 StyleSheet,//样式 Text,//文本组件 View,//视图组件 Image,//图片组件 TextInput, ScrollView,} from 'react-native';//引入像素点库

2017-03-23 13:52:42 1720

原创 输出和引入js文件 module.exports

需要输出的类import React, { Component } from 'react';import { AppRegistry, StyleSheet, Text, View,} from 'react-native';var Dimensions = require('Dimensions');//获取屏幕宽度var screenWidth = Di

2017-03-23 13:48:00 5561

原创 TouchableHighlight简单使用

//相当于button使用 <TouchableHighlight //点击后的背景颜色 underlayColor="#1FB579" //设置点击事件 onPress={hanwanjie}

2017-03-23 13:40:38 7240

原创 RN图片资源读取

一种读取RN项目本地资源 <Image source={require('./resources/images/loginImage.png')} />一种读取ios项目本地资源直接写图片名字 <Image source={require('loginImage.png')} />一种读取网络图片资源 如果读取http网络图片资源需要更改info.plish中的网络权限 <Image sour

2017-03-23 10:24:20 1326

原创 图片resizeMode

resizeMode有三种模式 /* * cover 等比例拉伸、 * strech保持原有大小 * contain 图片拉伸充满空间 * */ resizeMode:’contain’,

2017-03-23 10:20:17 1162

原创 iOS使用react-native时按cmd+r不能刷新模拟器?

iOS使用react-native时按cmd+r不能刷新模拟器

2017-03-22 17:45:50 3765

原创 constructor()构造函数和setInterval()定时器

import React, { Component } from ‘react’; import { AppRegistry, Text, View } from ‘react-native’;class Blink extends Component { //构造函数 constructor(props) { super(props); this.state = {

2017-03-22 17:02:53 330

原创 alignSelf

/** * Sample React Native App * https://github.com/facebook/react-native * @flow */import React, {Component} from ‘react’; import { AppRegistry,//注册 StyleSheet,//样式 Text,//文本组件

2017-03-22 15:20:42 531

原创 flexWrap

/** * Sample React Native App * https://github.com/facebook/react-native * @flow */import React, {Component} from ‘react’; import { AppRegistry,//注册 StyleSheet,//样式 Text,//文本组件

2017-03-22 15:19:39 299

原创 justifyContent和alignItems

/** * Sample React Native App * https://github.com/facebook/react-native * @flow */import React, {Component} from ‘react’; import { AppRegistry,//注册 StyleSheet,//样式 Text,//文本组件

2017-03-22 15:18:09 535

原创 react-native 笔记StyleSheet

/** * Sample React Native App * https://github.com/facebook/react-native * @flow */import React, {Component} from ‘react’; import { AppRegistry,//注册 StyleSheet,//样式 Text,//文本组件

2017-03-22 15:15:22 863

原创 error Received malformed response from registry for undefined. The registry may be down.

安装React Native 执行react-native init RNDemo 出现报错 error Received malformed response from registry for undefined. The registry may be down. 解决方法 npm config set registry https://registry.npm.taobao.org

2017-03-21 17:11:17 17426

原创 -bash: npm: command not found

brewupdate brew update brew uninstall node brewinstallnode brew install node brew postinstall node #This what the important step

2017-03-17 17:07:31 4790

原创 nvm 安装node.js问题Computing checksum with shasum -a 256 Checksums do not match:

Tagays-MacBook-Pro:~ serbiant$ nvm i 6 ######################################################################## 100.0% Computing checksum with shasum -a 256 Checksums do not match: ‘\392e511ca0d6203c80

2017-03-17 16:19:01 1665

原创 css监听窗口变化

监听窗口变化 .demo{ color: red; } /当窗口小于850的时候执行/ @media screen and (max-width: 850px){ .demo{ color: aqua; } }

2017-03-15 10:36:45 2525

原创 UIBezierPath绘制进度条

#import "ProgressBtn.h" #define myMIN(a,b) (((a) < (b))?(a):(b)) #define myMIN3(a,b,c) myMIN(myMIN(a,b),c) @implementation HKProgressBtn-(void)setProgress:(float)progress { _progress = progres

2017-03-07 15:32:24 579

原创 zip文件解压缩笔记ssziparchive

NSURLSession下载文件 使用ssziparchive 三方类库进行解压缩

2017-03-07 14:40:06 432

原创 NSURLConnection数据流下载异步解决方案

#import "URL.h"@interface URL () //文件输出流 @property(nonatomic,strong) NSOutputStream * fileStream;//下载线程的运行循环 @property(nonatomic,assign) CFRunLoopRef downloadRunloop;@end@implementation URL- (void)v

2017-03-07 13:38:39 311

原创 关于数据流NSOutputStream

#import "URL.h"@interface URL ()//文件输出流 @property(nonatomic,strong) NSOutputStream * fileStream;@end@implementation URL- (void)viewDidLoad { [super viewDidLoad];self.webView = [[UIWebView alloc]i

2017-03-07 12:01:42 485

原创 ios指纹识别

#import "指纹识别.h" #import <LocalAuthentication/LocalAuthentication.h>@interface __ ()@end@implementation __- (void)viewDidLoad { [super viewDidLoad];[self lAContext];}- (void)lAContext{LAContext

2017-03-03 16:33:30 376

原创 XML简略

#import "XMLVC.h"@interface XMLVC ()@end@implementation XMLVC(void)viewDidLoad { [super viewDidLoad]; [self loadXML]; }(void)loadXML{NSURL *url = [[NSURL alloc]initWithString:@”http://192.168.199.

2017-03-02 15:45:39 207

原创 URL 和JSON和 plist小结

#import "URL.h"@interface URL ()@property(nonatomic,strong) UIWebView *webView;@end@implementation URL(void)viewDidLoad { [super viewDidLoad];self.webView = [[UIWebView alloc]initWithFrame:self.view.

2017-03-02 14:35:59 277

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除