[置顶] iOS GCD dispatch_sync 与dispatch_async 区别

摘要: dispatch_sync和 dispatch_async需要两个参数,一个是队列,一个是block,它们的共同点是block都会在你指定的队列上执行(无论队列是并行队列还是串行队列),不同的是dispatch_sync会阻塞当前调用GCD的线程直到block结束,而dispatch_async异步 阅读全文
posted @ 2017-02-16 16:09 D_ye了淡淡 阅读(270) 评论(0) 推荐(0) 编辑

原生iOS导入RN

摘要: 1.在项目同级别目录新建 package.json(如果有则不需要),具体的依赖包会记录在 package.json 文件中,对于一个典型的RN项目来说,一般package.json和index.ios.js等文件会放在项目的根目录下。而iOS相关的源代码会放在一个名为 ios/ 的子目录中,这里同 阅读全文
posted @ 2017-06-16 09:52 D_ye了淡淡 阅读(190) 评论(0) 推荐(0) 编辑

iOS 调试工具 Chisel 的安装

摘要: Chisel github链接 https://github.com/facebook/chisel Chisel is a collection of LLDB commands to assist in the debugging of iOS apps. chisel 是LLDB命令的集合,主 阅读全文
posted @ 2017-02-15 15:13 D_ye了淡淡 阅读(99) 评论(0) 推荐(0) 编辑

React Native 初学第一课

摘要: 1.安装HomeBrew 首先,什么是Homebrew呢?Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn’t include with OS X. 官方的解释非常明 了,Homebr 阅读全文
posted @ 2017-02-14 15:04 D_ye了淡淡 阅读(81) 评论(0) 推荐(0) 编辑

searchBar

摘要: //修改searchBar 占位符 以及输入框颜色 self.homeSearchBar.barTintColor = [UIColor clearColor]; UITextField * searchTextField = [[[self.homeSearchBar.subviews first 阅读全文
posted @ 2016-06-15 16:13 D_ye了淡淡 阅读(86) 评论(0) 推荐(0) 编辑

基于runtime 的iOS反射

摘要: 主要通过runtime 获取类的属性,并通过jeson对对应的类进行赋值。 #import <Foundation/Foundation.h> @interface BaseModel : NSObject @property (nonatomic, strong) NSMutableArray * 阅读全文
posted @ 2016-05-31 10:58 D_ye了淡淡 阅读(285) 评论(0) 推荐(0) 编辑

iOS Magical Record (coredata)分页查询

摘要: //获取查询条件 NSFetchRequest * request = [SpeakTopicModel MR_requestAllWithPredicate:pre]; //设置排序字段 NSSortDescriptor *sortDescriptor = [[NSSortDescriptor a 阅读全文
posted @ 2016-05-31 10:28 D_ye了淡淡 阅读(216) 评论(0) 推荐(0) 编辑

在.pch 文件中加入 app 在发布时候 禁止打印

摘要: #ifdef DEBUG #define NSLog(...) NSLog(__VA_ARGS__) #define debugMethod() NSLog(@"%s", __func__) #else #define NSLog(...) #define debugMethod() #endif 阅读全文
posted @ 2016-03-09 16:07 D_ye了淡淡 阅读(118) 评论(0) 推荐(0) 编辑

Mac 显示与隐藏文件的命令

摘要: 显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool true 隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool false或者 阅读全文
posted @ 2016-03-09 16:06 D_ye了淡淡 阅读(143) 评论(0) 推荐(0) 编辑

iOS 系统代理的实现如:(tableView)

摘要: 在开发中的项目中,我们可能会遇到一种情况,比如tableView只需要创建和实现它的代理方法,通过调用代理方法来实现tableView的datasource 和代理就可以实现对tableView的创建和交互.不需要通过跳转来实现回调方法,个人认为tableView的daeasourcr回调的实现... 阅读全文
posted @ 2015-08-27 17:51 D_ye了淡淡 阅读(242) 评论(0) 推荐(0) 编辑