BLOCK
文章平均质量分 73
MinosIOS
心怀感恩
展开
-
block传值
A页面: A.h文件无内容. A.m文件: - (void)push { UILabel *label1 = (UILabel *)[self.view viewWithTag:1001]; TwoViewController *two = [[TwoViewController alloc]init]; [self.navigationController pushV原创 2014-11-19 12:08:32 · 347 阅读 · 0 评论 -
使用block应该注意的事项
1、在使用block前需要对block指针做判空处理。不判空直接使用,一旦指针为空直接产生崩溃if (!self.isOnlyNet) { if (succBlock == NULL) { //后面使用block之前要先做判空处理 return; } id data = [NSKeyedUnarchiver unarchiveObjectWithFile:[原创 2015-09-28 21:14:10 · 417 阅读 · 0 评论