How to Update Frames for all Size Classes in a Storyboard in Xcode 6.1?
How to Update Frames for all Size Classes in a Storyboard in Xcode 6.1?
How to Update Frames for all Size Classes in a Storyboard in Xcode 6.1?
It appears to be Apple’s intent to treat both iPad orientations as the same — but as a number of us are finding, there are very legitimate design reasons to want to vary the UI layout for iPad Portrait vs. iPad Landscape. However, I believe I have an answer for adapting size classes to do … Read more
As of iOS 8 UIViewController adopts the UITraitEnvironment protocol. This protocol declares a property named traitCollection which is of type UITraitCollection. You can therefor access the traitCollection property simply by using self.traitCollection UITraitCollection has two properties that you want to access named horizontalSizeClass and verticalSizeClass Accessing these properties return an NSInteger. The enum that defines … Read more
In the meantime I have found a good solution. Since this question has so many upvotes, I thought I would quickly describe it. I was inspired to this solution by a WWDC session. I have moved on to Swift so please excuse that the code will be in swift – the concept is however the … Read more
It appears to be Apple’s intent to treat both iPad orientations as the same — but as a number of us are finding, there are very legitimate design reasons to want to vary the UI layout for iPad Portrait vs. iPad Landscape. Unfortunately, the current OS doesn’t seem to provide support for this distinction … … Read more
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