[[UIScreen mainScreen] bounds].size at iOS simulator is not fixed
| Originator: | changyy.csie | ||
| Number: | rdar://18403281 | Date Originated: | 20-Sep-2014 14:55 |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | 6.0.1 (6A317) |
| Classification: | UI/Usability issue | Reproducible: | Always |
Summary:
My app use didRotateFromInterfaceOrientation event to change the frame of my UI.
I found that [[UIScreen mainScreen] bounds].size in iOS simulators won't change at any device rotation. At Xcode 6.01 Simulator at Mac OSX 10.9.5, the [[UIScreen mainScreen] bounds].size will not be fixed.
Steps to Reproduce:
1. add didRotateFromInterfaceOrientation function
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
NSLog(@"currentFrame: %@", NSStringFromCGRect(CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height)));
NSLog(@"orientation: %d %d", [UIDevice currentDevice].orientation, [UIApplication sharedApplication].statusBarOrientation);
}
2. use iOS simulator at Xcode 6.0.1 & Mac OS X 10.9.5 (MBP)
3. do simulator rotation
4. you will see the [[UIScreen mainScreen] bounds].size changed.
Expected Results:
NSLog( @"size: %@", NSStringFromCGSize([[UIScreen mainScreen] bounds].size)); will be fixed.
Actual Results:
NSLog( @"size: %@", NSStringFromCGSize([[UIScreen mainScreen] bounds].size)); not be fixed.
Version:
Xcode 6.0.1(6A317)
Mac OS X 10.9.5
Notes:
Configuration:
Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!