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
相关文章推荐
- More on Variables and Data Types(Chapter 10 of Programming in Objective-C 2.0)
- Data Types and Expressions(Chapter 4 of Programming in Objective-C 2.0)
- More on Classes(Chapter 7 of Programming in Objective-C 2.0)
- Categories and Protocols(Chapter 11 of Programming in Objective-C 2.0)
- Polymorphism, Dynamic Typing, and Dynamic Binding(Chapter 9 of Programming in Objective-C 2.0)
- Categories and Protocols(Chapter 11 of Programming in Objective-C 2.0)
- Polymorphism, Dynamic Typing, and Dynamic Binding(Chapter 9 of Programming in Objective-C 2.0)
- 6.087 Practical Programming in C, lec2: Variables and datatypes, operators.
- Making Decisions(Chapter 6 of Programming in Objective-C 2.0)
- Classes, Objects, and Methods(Chapter 3 of Programming in Objective-C 2.0)
- Working with Files(Chapter 16 of Programming in Objective-C 2.0)
- Archiving(Chapter 18 of Programming in Objective-C 2.0)
- Objective-C程序设计第10章---More on Variable and Data Types
- Numbers, Strings, and Collections(Chapter 15 of Programming in Objective-C 2.0)
- Numbers, Strings, and Collections(Chapter 15 of Programming in Objective-C 2.0)
- Copying Objects(Chapter 17 of Programming in Objective-C 2.0)
- Inheritance(Chapter 8 of Programming in Objective-C 2.0)
- The Preprocessor(Chapter 12 of Programming in Objective-C 2.0)
- two or more data types in declaration of `函数名'的报错
- The study of chapter 13 in programming windows with mfc-printing with document and views