Created
September 18, 2013 13:07
-
-
Save Shosta/6608899 to your computer and use it in GitHub Desktop.
Code to add on viewDidLoad to handle the new Window and View management from iOS6 to iOS7 for your TableView.
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
#pragma mark - View | |
#define STATUS_BAR_HEIGHT [UIApplication sharedApplication].statusBarFrame.size.height | |
#define NAVIGATION_BAR_HEIGHT self.navigationController.navigationBar.bounds.size.height | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view from its nib. | |
self.edgesForExtendedLayout = UIRectEdgeTop; | |
[self.yourTableView setContentInset:UIEdgeInsetsMake(STATUS_BAR_HEIGHT + NAVIGATION_BAR_HEIGHT, 0, 0, 0)]; | |
[self.yourTableView setScrollIndicatorInsets:UIEdgeInsetsMake(STATUS_BAR_HEIGHT + NAVIGATION_BAR_HEIGHT, 0, 0, 0)]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment