In Apple's photo's app you can swipe between photos while viewing, and also zoom into and pan around a photo. When you get to the edge of a zoomed photo you can still swipe into the next image - what kind of scrollview setup is needed to allow this?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
The easiest way to do this is to create one scroll view that scrolls only horizontally and has
pagingEnabled
set toYES
. Each page of this scroll view then contains another zoomable scroll view for an individual photo.There's an excellent video from WWDC 2010 - https://developer.apple.com/videos/wwdc/2010/
The session is titled "Designing Apps with Scroll Views". It's a step-by-step of exactly what you're asking.
Per omz's response, the paging scroller part is pretty straight forward. But Apple does some more complex things with how the zoomable scroll views are created and reused. You really should check out the video.