Objective-c中static的理解
2016-07-25 14:55
369 查看
与java不同,OC中的static代表在编译的时候进行初始化,规定变量的作用域和存储方式,也就是说写在哪里,那么作用域就在哪里。
比如在cellForRowAtIndexPath里面定义的identifier只能在这个方法里面使用,而定义在类外部的变量可以在整个类中使用,此类的外部不能访问
相关文章推荐
- es6 Object
- 数组越界Crash
- Property with 'retain (or strong)' attribute must be of object type 解决方法
- object references an unsaved transient instance - save the transient instance before flushing
- Exploit All the Layers: Fast and Accurate CNN Object Detector with Scale Dependent Pooling 之再阅读
- 在NSObject类中,和继承它的类中,弹出UIAlertcontroller和push、present到其它界面
- Qt之Meta-Object系统
- Qt之Meta-Object系统
- Qt之Meta-Object系统
- objective C 学习之02
- Gson:将Java对象转换为JsonObject
- QObject的event函数就可以改写对消息的处理
- QObject就有eventFilter,功能很强(随心所欲的进行处理,比如用来QLineEdit分词)
- ios object-c 中调用c函数
- [Javascript] Object.freeze() vs Object.seal()
- Object类介绍
- OC编码风格
- Object-C 学习进程
- java的设计模式——DAO(Date Access Object)133
- JavaSE 高级 第02节 Object类