snapshoViewAfterScreenUpdate causes view frame to jump
| Originator: | justinohms | ||
| Number: | rdar://15909891 | Date Originated: | 2014-01-25 |
| Status: | Closed | Resolved: | NO |
| Product: | iOS SDK | Product Version: | 7.0.1 |
| Classification: | Reproducible: | YES |
Summary:
When calling [self.view snapshotViewAfterScreenUpdates:YES] in an iPhone targeted app running on an iPad mini. All views are temporarily misaligned immediately following the call. This causes a very noticeable "flicker". This behavior does not happen if the app is targeted to the iPad. It does happen in the simulator and on an iPad mini.
Steps to Reproduce:
1. Open xCode and create a new single view iPhone project.
2. Create a button on the view
3. Drag click from the button to the companion editor to create an IBAction in the view controller .h file. (name this "testPress")
4. Open the view controller .m file
5. Add the following code to the "testPress" block:
//------------------------------------------------------------
UIView *testView = [self.view snapshotViewAfterScreenUpdates:YES];
NSLog(@"Self View: %@", self.view);
NSLog(@"Test View: %@", testView);
//Insert break point here
//------------------------------------------------------------
6. Insert the break point as noted in the code block.
7. Run the project on the iPad simulator or on an iPad
Expected Results:
No visual change should be observed with this code. When stopping on the break point the screen should be no different than when the application was started.
Actual Results:
In portrait mode the view is offset down and to the right about 80pts.
Version:
7.0.4 (11B554a)
Configuration:
iPad Mini, Xcode 5.0.2 (5A3005)
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!
Note this will reproduce if running an iPhone targeted app in the iPad simulator.