ios - 我必须使用 __strong 关键字吗?

标签 ios objective-c

我看到有人用下面的

__strong static foo *_foo = nil;

我想知道这里是否需要__strong;我的意思是 __strong 是默认值?是吗?

最佳答案

因为强引用是 default , 你是对的。

关于ios - 我必须使用 __strong 关键字吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18618099/

相关文章:

iphone - objective-c : swizzle object method after creation

objective-c - 无法为使用 typedef 的 block 编写正确的语法

iphone - 如何拦截点击 UITextView 中的链接?

ios - 以编程方式返回到不同 Storyboard 中的先前 ViewController

iphone - UISearchDisplayController 是在模态视图中加载时 TableView 分隔线故障,我该如何解决?

ios - child 失去了对 parent 的弱引用

ios - (SocketIO.Swift) .connect 回调被调用但未连接到服务器

ios - Alamofire 读取 header 响应

iOS 通过应用内购买添加大量产品

objective-c - 使用 'variable' 与 '_variable'?