Yaay!
On Sun, Jun 22, 2014 at 12:10 AM, Kyle Sluder <k...@ksluder.com> wrote: > On Jun 21, 2014, at 9:13 PM, Luther Baker <lutherba...@gmail.com> wrote: > > > > I want a 2-page horizontally scrolling UIScrollView on a simple > > UIViewController. Very similar to what Twitter does to swipe between > Home, > > Discover and Activity views. > > > > Using storyboards, dropping a UIScrollView on a UIViewController is a > piece > > of cake. Pinning the UIScrollView to the top and bottom layout guides - > > left and right parent view edges, piece of cake. I can paint the > background > > bright green and see it just fine. > > > > What is the best way to layout the 'content' views? I want them to be the > > size of the UIScrollView's frame. Specifically, what is the best way to > do > > this using AutoLayout? > > > > I know that Autolayout will cause the UIScrollView's contentSize to > adjust > > to fit its child views ... so does that mean I need to create height and > > width constraints on the child views - ie: I need actual numerical > values? > > Nope. You should be able to create an equal-width constraint between the > scroll view and one of your "page" subviews. Then make the rest of your > "page" subviews equal in width to the first one. > > You’ll also want to do this for the height. > > --Kyle Sluder > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com