访次: AmazingCounters.com 次
摘要: block就是指向结构体的指针,编译器会将block的内部代码生成对应的函数,利用这个指针就可以调用这个函数.普通的局部变量是值传递,用__block ,static ,或者是全局变量就是地址传递 block的内存默认是存放在栈里面的,他不会对所引用的对象进行操作 如果对block做一次copy操作 阅读全文
posted @ 2016-02-22 13:42 JusDoit 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 一个应用程序一启动就有一个进程,一个进程至少会有一个线程,这个线程就是主线程,除了主线程之外我们还可以手动创建其他线程,其他线程我们称为子线程,一个进程包含多个线程我们称为多线程,多线程的鼻祖是一个叫Mach的东西,Mach是第一个以多线程方式处理任务的系统,所以说多线程的底层实现机制是基于Mach 阅读全文
posted @ 2016-02-22 13:40 JusDoit 阅读(1371) 评论(0) 推荐(0) 编辑
摘要: - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { i 阅读全文
posted @ 2016-02-17 22:12 JusDoit 阅读(593) 评论(0) 推荐(0) 编辑
摘要: #iOS9 新特新介绍 ##一. UIStackView * 新控件:UIStackView 栈视图, 类似AppleWatch的Group * 父类:UIView * 特点: 1. 只能垂直或水平散列,因此不能完全取代Autolayout 2. 能够快速的按顺序获取到子控件 3. 批量修改间距更快 阅读全文
posted @ 2016-02-17 20:28 JusDoit 阅读(501) 评论(0) 推荐(0) 编辑
摘要: static NSMutableDictionary *_soundIDDict; /**缓存字典初始化 ,只加载一次*/ +(void)initialize{ _soundIDDict = [NSMutableDictionary dictionary]; } 阅读全文
posted @ 2016-02-17 20:10 JusDoit 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 这个问题主要是因为视图还没有加载出来就切换到下一个视图,模态视图的切换应该在view完全展示之后. 所以不要在viewdidload之类的方法中写切换视图代码. 阅读全文
posted @ 2016-02-17 20:02 JusDoit 阅读(287) 评论(0) 推荐(0) 编辑
摘要: // 如果要在真机运行, 需要一个session类, 并且制定分类为录音 AVAudioSession *session = [AVAudioSession new]; [session setCategory:AVAudioSessionCategoryRecord error:nil]; 阅读全文
posted @ 2016-02-17 19:40 JusDoit 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 我的代码如下AddTableViewController *add = [AddTableViewController new]; [self.navigationController addChildViewController:add]; [self.navigationController... 阅读全文
posted @ 2016-01-26 12:46 JusDoit 阅读(347) 评论(1) 推荐(0) 编辑
摘要: 程序运行崩溃 :'NSInvalidArgumentException', reason: '-[MyAnnotation setCoordinate:]: unrecognized selector sent to instance产生了一个警告:Auto property synthesis w... 阅读全文
posted @ 2016-01-22 00:11 JusDoit 阅读(527) 评论(0) 推荐(0) 编辑
摘要: //-------------------首先要遵守UIPanGestureRecognizer代理@interface HomeController ()//----------------定义UIPanGestureRecognizer属性@property (nonatomic,strong)... 阅读全文
posted @ 2016-01-18 10:42 JusDoit 阅读(599) 评论(0) 推荐(0) 编辑