![]() ![]() To kick off this UIScrollView tutorial, you’ll set up a scroll view that lets the user pan and zoom an image. What you really want is to fit the image to the device’s screen by default and zoom to see details, just like the Photos app does.Ĭan you fix it? Yes, you can! Scrolling and Zooming a Large Image You can select a photo to see it full-sized, but sadly, the device’s limited size prevents you from seeing the whole photo. You’ll see that you have several photos available in your project. Continue using the iPhone 8 simulator for the rest of the tutorial. Build and run using an iPhone 8 simulator to see what you’re starting with. Use the Download Materials button at the top or bottom of this tutorial to download the starter project, then open it in Xcode. ![]() If you’re not familiar with Interface Builder or storyboards, work through our storyboards tutorial before starting this one. This tutorial assumes you understand how to use Interface Builder to add objects and connect outlets between your code and storyboard scenes. Use UIPageViewController to allow scrolling through multiple pages of content.Prevent the keyboard from hiding text input components.Use UIScrollView for vertical scrolling with Auto Layout.Keep UIScrollView‘s content centered while zooming.Use UIScrollView to zoom and view a very large image.In this UIScrollView tutorial, you’ll create an app similar to the default iOS Photos app and learn all about UIScrollView. It’s the basis for the very popular UITableView and it’s a great way to present content that’s larger than a single screen. ![]() UIScrollView is one of the most versatile and useful controls in iOS. Update note: Ron Kliffer updated this tutorial for Xcode 11, Swift 5 and iOS 13. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |