Created
May 14, 2014 13:06
-
-
Save premedios/d1d68c97589aab8ea66d to your computer and use it in GitHub Desktop.
Table header with UILabel
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
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.tableView.bounds.size.width, 50.0f)]; | |
headerView.backgroundColor = [UIColor colorWithRed:0.31f green:0.77f blue:0.83f alpha:1.0f]; | |
[self.navigationController setNavigationBarHidden:YES]; | |
self.view.backgroundColor = [UIColor colorWithRed:0.31f green:0.77f blue:0.83f alpha:1.0f]; | |
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.tableView.bounds.size.width, 44.0f)]; | |
titleLabel.textColor = [UIColor whiteColor]; | |
[headerView addSubview:titleLabel]; | |
self.tableView.tableHeaderView = headerView; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment