ARC 中,在方法中创建对象如果不强引用对象就会被释放
[[AddressBookManager alloc]initWithTarget:self MessageNameArray:@[@"13811928431"] Message:message Block:^(int type) {
NSLog(@"%d",type);
}];
正确写法
@property (nonatomic,strong)AddressBookManager *ad
_addressBookManager =[[AddressBookManager alloc]initWithTarget:self MessageNameArray:@[@"13811928431"] Message:message Block:^(int type) {
NSLog(@"%d",type);
}];
本文探讨了Objective-C与Swift两种编程语言在iOS开发领域的应用与区别,包括其优势、使用场景及迁移策略。
231

被折叠的 条评论
为什么被折叠?



