博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

hide the property declarations a class extension

Posted on 2013-01-21 13:22  酸梅拯救地球  阅读(172)  评论(0)    收藏  举报

1.Outlets may be considered private to the defining class; if you prefer, you can hide the property declarations a class extension. For example:

// MyClass.h
 
@interface MyClass : MySuperclass
@end
 
// MyClass.m
 
@interface MyClass ()
@property (weak) IBOutlet MyView *viewContainerSubview;
@property (strong) IBOutlet MyOtherClass *topLevelObject;
@end

 

2.If you specify a nib file when creating the view controller, that nib file is loaded automatically when you try to access the view controller’s view.

3.