Created
December 30, 2014 23:33
-
-
Save 2ndmouse/27be93bff81c58e44aef to your computer and use it in GitHub Desktop.
Fixed the problem of "UITableview and tabbar overlapping"
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
- (void)loadView{ | |
// cannot set the height here because the data has not been loaded into the tableview yet | |
// so I just set it to zero | |
UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectZero | |
style:UITableViewStylePlain]; | |
} | |
// set the custom height here | |
- (void)viewWillLayoutSubviews{ | |
self.tableView.frame = CGRectMake(0, 0, [self widthForView], [self heightForView]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment