Offscreen UITableViewCells (for size calculations) not respecting size class?

Update on Dec 2015: Apple now discourages overriding -traitCollection. Please consider using other workarounds. From the doc: IMPORTANT Use the traitCollection property directly. Do not override it. Do not provide a custom implementation. Original Answer: The existing answer is great. It explained that the problem is that: -dequeueReusableCellWithIdentifier: returns a cell without a valid cell.traitCollection, … Read more

Custom Font Sizing in Xcode 6 Size Classes not working properly with Custom Fonts

Fast fix: 1) Set fonts as System for size classes 2) Subclass UILabel and override “layoutSubviews” method like: – (void)layoutSubviews { [super layoutSubviews]; // Implement font logic depending on screen size if ([self.font.fontName rangeOfString:@”bold” options:NSCaseInsensitiveSearch].location == NSNotFound) { NSLog(@”font is not bold”); self.font = [UIFont fontWithName:@”Custom regular Font” size:self.font.pointSize]; } else { NSLog(@”font is bold”); … Read more