您的位置:首页 > 移动开发 > Objective-C

More on Variables and Data Types(Chapter 10 of Programming in Objective-C 2.0)

2019-08-01 21:21 597 查看
原文链接:https://www.geek-share.com/detail/2498405600.html   You can put four directives in front of your instance variables when they are declared in the interface section, to more precisely control their scope:  @protected—Methods defined in the class and any subclasses can directly access the instance variables that follow.This is the default case.  @private—Methods defined in the class can directly access the instance variables that follow, but subclasses cannot.  @public—Methods defined in the class and any other classes or modules can directly access the instance variables that follow.  @package—For 64-bit images, the instance variable can be accessed anywhere within the image that implements the class.

 

转载于:https://www.cnblogs.com/zhtf2014/archive/2010/10/18/1854907.html

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: