Created
December 16, 2013 21:17
-
-
Save maddiesch/7994593 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface View : UIView | |
@property (nonatomic, weak) UIView *mySubview; | |
@end | |
@implementation View | |
- (UIView *)mySubview { | |
if (!_mySubview) { | |
UIView *v = [[UIView alloc] initWithFrame:CGRectZero]; | |
... some setup | |
_mySubview = v; | |
[self addSubview:v]; | |
} | |
return _mySubview; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment