UIScrollView zoom animation jumps to side of screen
| Originator: | nate | ||
| Number: | rdar://17816158 | Date Originated: | 2014-07-25 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 8 |
| Classification: | UI/Usability | Reproducible: | Always |
Summary: When using a UIScrollView with interactive zoom (viewForZoomingInScrollView), I use layoutSubviews to adjust the zooming view's frame, as was recommended in the WWDC sample code "PhotoScroller 1.3". In iOS 8, there is now a glitch when animating back to rest from a small zoom scale; the zoom view jumps to an X-origin of 0 during the animation. Steps to Reproduce: Open the attached sample project "PhotoScrollerZoomAnimationBug". (this is modified from the PhotoScroller sample project) in Xcode 6 and build against iOS 8 (Beta 4) Place a breakpoint on the NSLog statement reading "Breakpoint here to see animation glitch" Run the project and pinch the image to shrink it, then let go. The breakpoint should fire. Continue from the breakpoint and watch the animation of the zoom view occur: the origin will suddenly jump to 0. Expected Results: I'd expect that the frame in layoutSubviews would apply to the final frame of the zoom snapping animation, not apply immediately. This was the behavior in iOS 7 and below Actual Results: Just before the zoom snapping animation runs, the frame.origin.x of the zoom view immediately jumps to 0 Version: iOS 8 Beta 4 Notes: Configuration: iPhone 5 Verizon. Xcode 6/iOS 8b4 simulator Attachments: 'PhotoScrollerZoomAnimationBug.zip' was successfully uploaded.
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!