摘要: //创建场景 let scene = SCNScene() /* //1.几何 let box = SCNBox.init(width: 0.1, height: 0.1, length: 0.1, chamferRadius: 0 ) //2.渲染 let materil = SCNMateria 阅读全文
posted @ 2017-10-09 21:27 Da雪山 阅读(303) 评论(0) 推荐(0) 编辑
摘要: ARKit 从入门到精通 http://www.chinaar.com/ARKit/5210.html ARKit 框架的学习 http://blog.csdn.net/biangabiang/article/details/76618513 SceneKit框架的学习 http://blog.cs 阅读全文
posted @ 2017-09-12 23:12 Da雪山 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 作者:CC老师_MissCC链接:http://www.jianshu.com/p/e3bc47e81785來源:简书 苹果内购 1.什么是内购? 如果你购买的商品,是在本app中使用和消耗的,就一定要用内购,否则会被拒绝上线,例如:游戏币,在线书籍,app中使用的道具等虚拟产品。如果购买的就是普通 阅读全文
posted @ 2017-08-29 18:18 Da雪山 阅读(842) 评论(0) 推荐(0) 编辑
摘要: #import <Foundation/Foundation.h> #import <AVFoundation/AVFoundation.h> @interface Speaker : NSObject @property(nonatomic,strong)AVSpeechSynthesizer * 阅读全文
posted @ 2017-08-29 18:16 Da雪山 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 一. 单元测试 简介: 单元测试, 又称模块测试, 是针对程序模块的最小单位来进行测试. 对于过程化变成来说, 一个单元就是单个函数 \ 过程等; 对于面向对象变成来说, 一个单元就是一个方法. 有了单元测试, 我们不需要每次都com+R 启动我们的程序,对于大的项目来说, 启动一次项目都会花费很长 阅读全文
posted @ 2017-08-15 11:42 Da雪山 阅读(710) 评论(0) 推荐(0) 编辑
摘要: 介绍: 每次滚动都会触发 didScroll 这个方法, 每次滚动都会有一个偏移量,滚动的快慢决定每一次偏移量的大小,可以通过两次滚动偏移量差,判断速度,从而根据速度大小对导航栏做一些操作 { CGFloat _contentOffsetY;//上次的offset CGFloat _contentO 阅读全文
posted @ 2017-08-10 10:25 Da雪山 阅读(863) 评论(0) 推荐(0) 编辑
摘要: 不同页面实现& shouldAutorotate/supportedInterfaceOrientations 等方法不起作用, 不能控制横竖屏的切换 正常的实现逻辑中, 只需要在控制器A中实现以下 - (BOOL)shouldAutorotate { return NO; } - (UIInter 阅读全文
posted @ 2017-08-08 17:54 Da雪山 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 一. 静态库.a 1.创建静态库工程 Cocoa Touch Static Libray ,然后可以创建一个测试视图 TestView 2.暴露头文件 -> Build Phases--> 点左上角+ 加号-> New Header Phase ,此时下面多了一个行 Headers 文件 ,将需要暴 阅读全文
posted @ 2017-07-21 10:59 Da雪山 阅读(681) 评论(0) 推荐(0) 编辑
摘要: NSThread简介 使用NSThread 实现多线程,需要手动管理线程的生命周期, 一.线程的创建 //1.实例方法创建,,需要手动启动线程 NSThread *thread = [[NSThread alloc]initWithTarget:self selector:@selector(run 阅读全文
posted @ 2017-07-19 14:29 Da雪山 阅读(209) 评论(0) 推荐(0) 编辑
摘要: NSOperation简介 相对于 GCD ,具有面向对象的特征,比 GCD 更简单易用,代码可读性强 NSOperatioin 单独使用时, 不具有开辟新线程的能力, 只是同步执行操作, 需要配合 NSOpeationQueue 来实现多线程操作 //验证: 没有队列时, 同步执行 //子类 NS 阅读全文
posted @ 2017-07-19 11:58 Da雪山 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 参考:http://www.jianshu.com/p/2d57c72016c6 GCD 的两个核心概念: 队列 与 任务 一.队列 队列分为串行队列和并发队列, 队列的作用是管理开发者提交的任务,在队列的底层维护了一个线程池,用于执行任务 串行队列底层的线程池, 只维护一个线程 并发队列底层的线程 阅读全文
posted @ 2017-07-19 11:23 Da雪山 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 直接使用: 😁 加载 UIView 的 xib 文件方式有以下几种方式: 一 .直接加载 xib 文件, 没有.h.m 文件 1. NSBundle 方式 NSArray *objs = [[NSBundle mainBundle]loadNibNamed:@"XibView" owner:nil 阅读全文
posted @ 2017-07-18 09:47 Da雪山 阅读(8441) 评论(0) 推荐(0) 编辑
摘要: Xcode8—Swift开发使用Cocoapods引入第三方库异常处理方法 参考: http://www.jianshu.com/p/23f13be525a0 //podfile文件如下 platform :ios, '10.0' use_frameworks! target 'testSWift' 阅读全文
posted @ 2017-07-04 16:58 Da雪山 阅读(317) 评论(0) 推荐(0) 编辑
摘要: .h #import <UIKit/UIKit.h> #import <objc/runtime.h> @interface UIControl (XY) @property (nonatomic, assign) NSTimeInterval fy_acceptEventInterval; @pr 阅读全文
posted @ 2017-07-03 15:11 Da雪山 阅读(229) 评论(0) 推荐(0) 编辑
摘要: http://blog.sina.com.cn/s/blog_68661bd80101njdo.html 标签: ios时间戳 ios开发时间戳 ios16进制转中文 ios开发utf8转中文 ios汉字转utf8和16进 ios时间戳 ios开发时间戳 ios16进制转中文 ios开发utf8转中 阅读全文
posted @ 2017-06-21 09:31 Da雪山 阅读(3347) 评论(0) 推荐(0) 编辑
摘要: 基础: http://www.2cto.com/kf/201609/546974.html 转自: http://blog.csdn.net/u013282507/article/details/52621434 本篇文章的例子主要实现通过socket实时接收数据的一个图文直播的功能模块,代码为so 阅读全文
posted @ 2017-06-14 09:31 Da雪山 阅读(3236) 评论(0) 推荐(0) 编辑
摘要: //一.读取 //1.以只读方式打开 NSFileHandle *fh = [NSFileHandle fileHandleForReadingAtPath:txtPath]; //2.读取所有内容 NSData *allData = [fh readDataToEndOfFile]; //转化st 阅读全文
posted @ 2017-06-06 23:24 Da雪山 阅读(202) 评论(0) 推荐(0) 编辑
摘要: //NSFileManager - (void)viewDidLoad { [super viewDidLoad]; NSLog(@"%@",NSHomeDirectory()); NSString *docPath = [NSSearchPathForDirectoriesInDomains(NS 阅读全文
posted @ 2017-06-06 23:01 Da雪山 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 一:请求 http://www.jianshu.com/p/8a90aa6bad6b 二:下载 iOS网络--『文件下载、断点下载』的实现(一):NSURLConnection http://www.jianshu.com/p/ce3eaee74bde iOS网络--『文件下载、断点下载』的实现(二 阅读全文
posted @ 2017-05-31 16:44 Da雪山 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 使用总结: 一. 创建索引库 1.创建远程索引库 在远程创建一个索引库(码云),私有的 2.创建本地索引库,并与远程索引库关联 pod repo add <本地索引库名称> <远程索引库地址.git> //查看是否创建成功 pod repo 二.创建远程代码库 1.在远程创建一个代码库(码云),私有 阅读全文
posted @ 2017-05-24 23:51 Da雪山 阅读(1181) 评论(0) 推荐(0) 编辑
摘要: 参考 https://www.jianshu.com/p/9183cded6b2e 1,查看 pod repo 查看本地 pod 目录信息 2, 创建spec pod spec create LocaPod 3.修改spec 文件 //.summary 摘要信息(短一点) //.descriptio 阅读全文
posted @ 2017-05-24 22:49 Da雪山 阅读(1014) 评论(0) 推荐(0) 编辑
摘要: 本地: > 远程仓库 | 代码库 工作区 > 缓存区 > master分支 > GitHub 基本命令: //1.进入到工程路径 cd 路径 //2.创建本地仓库 git init 退出git init 命令: rm -rf .git //需要配置用户名 //3.查看 缓存区状态(是否有东西) gi 阅读全文
posted @ 2017-05-22 23:11 Da雪山 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 一.首先要理解keychain与userdefaults的区别: 1.keychain是将数据加密后存储在本地,更安全.路径:Library/Application Support/iPhone Simulator/模拟器版本/Library/Keychains/ userdefaults数据以明文 阅读全文
posted @ 2017-05-19 09:47 Da雪山 阅读(421) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2017-05-07 15:43 Da雪山 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 参考: http://blog.csdn.net/yohunl/article/details/41748511 http://blog.csdn.net/amuseme_lu/article/details/6261719 https://wiki.apache.org/thrift/Thrift 阅读全文
posted @ 2017-04-27 11:37 Da雪山 阅读(264) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/Jenaral/p/5655958.html 阅读全文
posted @ 2017-04-21 17:27 Da雪山 阅读(244) 评论(0) 推荐(0) 编辑
摘要: #pragma mark -- 创建CollectionView - (void)createCollectionView{ //关闭自适应 self.automaticallyAdjustsScrollViewInsets = NO; UICollectionViewFlowLayout *fl 阅读全文
posted @ 2017-04-21 11:50 Da雪山 阅读(17027) 评论(0) 推荐(0) 编辑
摘要: 1增 1.1【插入单行】insert [into] <表名> (列名) values (列值)例:insert into Strdents (姓名,性别,出生日期) values ('开心朋朋','男','1980/6/15') 1.2【将现有表数据添加到一个已有表】insert into <已有的 阅读全文
posted @ 2017-04-10 09:26 Da雪山 阅读(174402) 评论(4) 推荐(6) 编辑
摘要: #pragma mark -- 数库 - (void)createDatabase{ //路径 NSString *path = [NSString stringWithFormat:@"%@/Documents/maxueshan.db",NSHomeDirectory()]; //创建 _dat 阅读全文
posted @ 2017-04-10 09:12 Da雪山 阅读(789) 评论(0) 推荐(0) 编辑
摘要: //获取图片 + (UIImage*) getImageWithColor:(UIColor*)color andHeight:(CGFloat)height { CGRect r= CGRectMake(0.0f, 0.0f, 1.0f, height); UIGraphicsBeginImage 阅读全文
posted @ 2017-04-07 13:57 Da雪山 阅读(555) 评论(0) 推荐(0) 编辑
摘要: // // ViewController.m // DMHeartFlyAnimation // // Created by Rick on 16/3/9. // Copyright © 2016年 Rick. All rights reserved. // #import "ViewControl 阅读全文
posted @ 2017-04-06 16:34 Da雪山 阅读(406) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/jenminzhang/article/details/47017741 http协议:处于互联网协议的应用层,角色是规定数据传输的格式,http是建立在socket(这里的上下文指的是http socket)之上的 TCP/IP协议是传输层协议,主要解决数 阅读全文
posted @ 2017-04-05 11:51 Da雪山 阅读(198) 评论(0) 推荐(0) 编辑
摘要: #import <UIKit/UIKit.h> @interface RCDNavigationViewController : UINavigationController<UIGestureRecognizerDelegate,UINavigationControllerDelegate> @e 阅读全文
posted @ 2017-04-01 14:09 Da雪山 阅读(1173) 评论(0) 推荐(0) 编辑
摘要: Runtime常见的几个应用场景。 Runtime常见应用场景 具体应用拦截系统自带的方法调用(Method Swizzling黑魔法) 实现给分类增加属性 实现字典的模型和自动转换 JSPatch替换已有的OC方法实行等 具体应用拦截系统自带的方法调用(Method Swizzling黑魔法) 实 阅读全文
posted @ 2017-03-24 17:26 Da雪山 阅读(2404) 评论(0) 推荐(0) 编辑
摘要: 2. 基本思想 通过一趟排序将要排序的数据分割成独立的两部分,其中一部分的所有数据都比另外一部分的所有数据都要小,然后再按此方法对这两部分数据分别进行快速排序,整个排序过程可以递归进行,以此达到整个数据变成有序序列。 3. 步骤 a. 先从数列中取出一个数作为基准数。 b. 分区过程,将比这个数大的 阅读全文
posted @ 2017-03-17 10:40 Da雪山 阅读(151) 评论(0) 推荐(0) 编辑
摘要: //将十六进制的字符串转换成NSString则可使用如下方式: + (NSString *)convertHexStrToString:(NSString *)str { if (!str || [str length] == 0) { return nil; } NSMutableData *he 阅读全文
posted @ 2017-03-14 11:02 Da雪山 阅读(747) 评论(0) 推荐(0) 编辑
摘要: #pragma mark -- 统一导航条样式 //统一导航条样式 UIFont *font = [UIFont systemFontOfSize:19.f]; NSDictionary *textAttributes = @{ NSFontAttributeName : font, NSForeg 阅读全文
posted @ 2017-03-14 09:01 Da雪山 阅读(459) 评论(0) 推荐(0) 编辑
摘要: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization aft 阅读全文
posted @ 2017-03-13 11:48 Da雪山 阅读(187) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h" #import <WebKit/WebKit.h> @interface ViewController ()<WKScriptMessageHandler,WKNavigationDelegate,WKUIDelegate> //webView 阅读全文
posted @ 2017-03-06 15:47 Da雪山 阅读(272) 评论(0) 推荐(0) 编辑
摘要: //创建Layer CAEmitterLayer *emitterLayer = [CAEmitterLayer layer]; //边框 emitterLayer.borderWidth = 1.0f; //尺寸 emitterLayer.frame = CGRectMake(100, 100, 阅读全文
posted @ 2017-02-27 22:44 Da雪山 阅读(226) 评论(0) 推荐(0) 编辑