Post

Replies

Boosts

Views

Activity

XCode13 beta,iOS15. set tableview section header to 0. not working
self.tableView = [[UITableView alloc] initWithFrame:self.view.frame]; - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { UILabel *label = [[UILabel alloc] init];     label.text = @"test";     return label; } - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {     return 0.01; } it works perfect on iOS14. but on iOS15 XCode13 beta. it doesn't work anymore. have a default header which height is 22 here
3
0
4.7k
Jun ’21
navigationBar setBackgroundImage not working on iOS15
- (void)viewDidLoad {     [super viewDidLoad];     [self.navigationController.navigationBar setBackgroundImage:[self imageWithColor:[UIColor redColor]] forBarMetrics:UIBarMetricsDefault]; } - (UIImage *)imageWithColor:(UIColor *)color {     CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f);     UIGraphicsBeginImageContext(rect.size);     CGContextRef context = UIGraphicsGetCurrentContext();     CGContextSetFillColorWithColor(context, [color CGColor]);     CGContextFillRect(context, rect);     UIImage *image = UIGraphicsGetImageFromCurrentImageContext();     UIGraphicsEndImageContext();     return image; } it works on iOS14, but on iOS15. it doesn't work. the color of navigationBar does't change
1
0
7.9k
Jun ’21