Zso*_*olt 2 iphone ios5 automatic-ref-counting
Implicit conversion of 'BOOL' (aka 'signed char') to 'id' is disallowed with ARC
Run Code Online (Sandbox Code Playgroud)
这是我尝试使用自动化工具将某些代码迁移到ARC时遇到的错误
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(vDidFinish)
name:aNotifName
object:NO];
Run Code Online (Sandbox Code Playgroud)
我怎样才能确保它符合ARC要求?
小智 6
您应该为第四个参数(通知发件人)使用正确的类型.它需要一个Objective-C对象 - 如果你不想指定一个,则传递nil而不是NO; 后者是BOOL类型的文字值.
| 归档时间: |
|
| 查看次数: |
8584 次 |
| 最近记录: |