Create a UIScrollView using Auto Layout in Storyboard for Xcode 9



Create a UIScrollView using Auto Layout in Storyboard for Xcode 9

Learn how to create a UIScrollView that can contain more content than fits on the screen using this tutorial.

1. Create scroll view, set constraints
2. Create content view inside scroll view, set constraints
3. Rename ContentView
4. Equal widths and heights from ContentView to the ScrollView
5. Lower priority for the height to 250 (make it low, so that it doesn’t override the iPhone height)
6. Add all content to the ContentView, not the scroll view!

Grab the Xcode project on GitHub

Learn how to make iPhone apps from scratch using Swift 4, Xcode 9, and iOS 11. I teach how to use Storyboard, Auto Layout, UI Design, app ideas, and app usability.

Download the code:
Make your first iPhone app:
Blog:
Follow Paul:
Email: Paul@SuperEasyApps.com
Community:

Click here to Subscribe:

Nguồn: https://top100vn.com/

Xem thêm bài viết khác: https://top100vn.com/cong-nghe/

34 thoughts on “Create a UIScrollView using Auto Layout in Storyboard for Xcode 9

  1. I come back to this video every few months when I need a scroll view – that's how unintuitive it is to me! Thanks so much for this!!

  2. I was just in class being taught by you, and now came here to watch this to finish my student project 🤦‍♂️ Paul is everywhere and the best!

  3. Thank you so much. I had been bashing my head against a wall of scrollview nightmares. Tried everything. This fixed it. Thank you!

  4. Just started getting into Autolayout after 6 years of development.. this just saved my life haha, thanks man

  5. Thank you. Is there any way to do Relation with Less Than or Equal after giving scrollView Height Constraint as a large value?

  6. So this works in Xcode 11, HOWEVER, you need to go into the scroll view , click on the size inspector and TURN OFF Content Layout Guides. Would love to see a tutorial that uses those. Once I turn that off, the steps in this video work just fine

  7. THANK YOU SO MUCH! i'm SouthKorean ,and i was searching google, but i can't do that…. but finally you save me!

  8. Thank you!!! I'm not sure which of the settings you carefully walked through in setting up the ScrollView did it, but by 6:32 I had mine working after hours of poking and guessing. I bet it was the 250 priority setting. My ScrollView wasn't even the same size as the SuperView, but I could still interpolate with your clear instructions. Bless you for doing this!

  9. plzz make tutorial on how to detect user inactivity since his last touuch in app.
    if he hasn'tperform any activity for certain period of time then we could send him to other viewController or logout him..
    thanks

  10. I've been doing iOS programming for 3+ years now, but still learned some shortcuts and storyboard ticks in this video. Bravo!

  11. Fantastic video and example project. I would've never thought to change the height priority – videos like this make Swift a usable language!

  12. working with Scrollview in swift and iOS is such a PAIN for real, I do all this in Android with less than a minute! thanks for the video btw, it helped SO MUCH

  13. When I do exactly what you have done here and add constraints like you did on 1:40 I get an error message and red lines around the scroll view, that my scroll view has ambiguous scrollable content hight and width. Can you help me out on that?

  14. I think your tutorial is not working with Xcode 11. Can you please fix it for universal app (iPhone, iPad and Mac)

Leave a Reply

Your email address will not be published. Required fields are marked *