加载UI

weak情况

1
2
3
4
@property (weak,nonatomic) UILabel *nameLabel;
 
UILabel *nameLabel = [[UILabel alloc] init];
self.nameLabel = nameLabel;





strong情况

1
2
3
4
5
6
7
8
9
@property (strong,nonatomic) UILabel *timeLabel;
 
- (UILabel *)timeLabel
{
    if (!_timeLabel) {
        _timeLabel = [[UILabel alloc] init];
    }
    return _timeLabel;
}
posted @ 2015-11-23 10:29  韦韦韦  阅读(132)  评论(0编辑  收藏  举报