Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 18.104.22.168 release ready!
Owner and Founder. Opencart
Hello guys, Today we will learn about the Multiple view inside scroll view with Auto layout.
Before starting we need to know what is Auto Layout?
Auto layout is a constant-based layout system, we can also say that it is an adaptive UI that is responsible for the appropriate change in screen size according to device orientation.
without using auto layout, it would be very difficult to create an app screen that supports all screen resolution
For better understanding let’s take an example of multiple views inside a scroll view
Take a scroll view in the view controller and set a leading trailing top and bottom constraint to (0), uncheck constrain content Layout Guides.
Now, take a view inside scroll view and set trailing, leading or bottom to (0) and set Height (200) and equal width to scroll view
Step 4:- Now, take scroll view inside view and set constraint to top, bottom, leading trailing to (0,0,0,0)
Step 5:- take view inside scroll view and set constraint to top, bottom, leading trailing to (0,0,0,0) and take label inside view and set margins to top, trailing, leading and height >= 0
For more view follow step 2 to step 5, your screen looks like –
After adding all the views, we define the view in the storyboard with constraint
Run the app and see your view is look like this –
In this blog, we have discussed Multiple views inside scroll view with Auto layout working
I hope this blog will help you in getting some basic knowledge about the Multiple views inside scroll view with the Auto layout.
Thanks for reading!
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.