Created
December 4, 2019 13:32
-
-
Save qy1010/20f3274dc372519ec21f94edb409e8ee 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
UILabel *headerTitle = [[UILabel alloc] init]; | |
headerTitle.text = NSLocalizedString(@"profile_language_limit", @"语言最多只能选择3个"); | |
headerTitle.textColor = [UIColor colorNamed:@"secondaryTextColor"]; | |
headerTitle.font = [UIFont fontWithName:@"Roboto-Regular" size:11];; | |
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 40)]; | |
headerView.backgroundColor = [UIColor colorNamed:@"mainBackgroundColor"]; | |
[headerView addSubview:headerTitle]; | |
[headerTitle mas_makeConstraints:^(MASConstraintMaker *make) { | |
make.leading.mas_equalTo(16); | |
make.centerY.equalTo(headerView); | |
}]; | |
self.tableView.tableHeaderView = headerView; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment