Created
February 7, 2013 17:12
-
-
Save jdriscoll/4732483 to your computer and use it in GitHub Desktop.
This is the best way I've found so far to handle one time setup that requires the view already be laid out (so no viewWillAppear) when using auto layout.
This file contains hidden or 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
@property (nonatomic, assign) BOOL viewHasInitialLayout; | |
- (void)viewDidLayoutSubviews | |
{ | |
[super viewDidLayoutSubviews]; | |
if (!self.viewHasInitialLayout) { | |
// Do stuff | |
self.viewHasInitialLayout = YES; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment