- in storyboard I set view controller size iPhone3.5-inch
- add constraints with UILabel
UILabel.text cannot show all,so i change view controller size iPhone 4.7-inch
so i tap UIlabel update frame , autolayout work, it all ok!this is iPhone 4.7-inch
now the problem coming,when i run in iPhone simulator iPhone 6, autolayout don't working, the label size only zoom, the width don't change longer。 and The following three images constraints width and height both 32,but in simulator iPhone 6 images size Look bigger,Why is this so? please help me ,very thinks
No matter iphone6 or iphone5 iphon6+ ,code here output 320, why...
-(void)viewDidLayoutSubviews{ [super viewDidLayoutSubviews]; NSLog(@"%f",self.view.frame.size.width); }
Set trailing and top constraint with fixed height/width.
this prevents label from changing font size depend on it's frame
Hope this helps.