1.在.h文件中,例如:@interfacePullToRefreshView:UIView{ UILabel*lastUpdatedLabel; UILabel*statusLabel; CALayer*arrowImage; UIActivityIndicatorView*activityView;}2.在.h文件中,例如:@property(nonatomic,strong)UIScrollView*scrollView;3.在.m文件中,例如:@interfacePullToRefreshView@property(nonatomic,strong)NSArray*titles;@end4.在.m文件中,例如:@implementationTopicListViewController{PullToRefreshView*pull}簡而言之,是否是1.在頭文件中的是public屬性,在.m中的是private屬性?2.在@interface和@implementation中用大括號擴起來的和@property有何區(qū)別?(除了synthesize方面)3.一般情況下應(yīng)該如何寫?
Objective-C 中下列類屬性的寫法有何不同?
慕尼黑8549860
2019-04-23 15:18:44