Property and Outlet
2013-04-02 09:33
239 查看
The above lines of code defines three instance variables that later to be associated with the table cell view in Interface Builder. The keyword “@property” is used to declare a property within a class in the
following form:
@property (attributes) type name;
Referring to the lines of code above, weak and nonatomic are the attributes of the property. UILabel and UIImageView are the types, while the “nameLabel”, “prepTimeLabel” and “thumbnailImageView” are the names.
So what’s IBOutlet? You can think of IBOutlet as an indicator. To associate the instances variables with the elements in the Table View Cell (i.e. SimpleTableCell.xib), we use the keyword “IBOutlet” to let Interface
Builder know that they’re allowed to make connection. Later, you’ll see how to make a connection between these outlets and the objects in Interface Builder.
End
following form:
@property (attributes) type name;
Referring to the lines of code above, weak and nonatomic are the attributes of the property. UILabel and UIImageView are the types, while the “nameLabel”, “prepTimeLabel” and “thumbnailImageView” are the names.
So what’s IBOutlet? You can think of IBOutlet as an indicator. To associate the instances variables with the elements in the Table View Cell (i.e. SimpleTableCell.xib), we use the keyword “IBOutlet” to let Interface
Builder know that they’re allowed to make connection. Later, you’ll see how to make a connection between these outlets and the objects in Interface Builder.
End
相关文章推荐
- WTL 学习笔记 -- Property Sheets and Wizards
- ODP.NET Tip: Bind Variables and the BindByName Property
- [CSS3] CSS Display Property: Block, Inline-Block, and Inline
- Kotlin .. Java Concepts Clarification(1): Property and Field
- [转] How to change font settings for all UI elements (toolbar and context menus, property editors, etc.)
- hibernate search and property lazyload and lucene
- Javascript constructor and property
- mybatis错误之 Property 'configuration' and 'configLocation' can not specified with together 解决
- New Year and Old Property CodeForces - 611B
- Property list types and their various representations
- Android studio更新后出现警告:Warning:The `android.dexOptions.incremental` property is deprecated and it has
- iOS - Actions and Outlet
- python - @property and the python property
- VS 2005 and VS 2008 Tip: 自动生成Property
- [Objective-C] class add a property and its setter and getter
- WTL for MFC Programmers, Part VIII - Property Sheets and Wizards
- Property and Synthesize
- EL Property Access and Nested Properties Examples
- THE ENFORCEMENT OF PROPERTY RIGHTS IN CHILDREN, AND THE MARRIAGE CONTRACT
- Warning:The `android.dexOptions.incremental` property is deprecated and it has no effect on the buil