ios - How to modify a view in my storyboard to support scrolling in Xcode? -
I'm in the middle of creating an iPhone app. I have a storyboard with many scenes. Content that fills the entire iPhone 5 screen, which is not spare. I want to make this screen scroll for some of the older iPhone 3.5 "screens I know of an easy way to do.? I just tried to change UIViewView to UIScrollView but it did not seem to do anything.
Any suggestions are greatly appreciated!
Try it out.> < P> Add this code to viewDidLoad in the Meter file
UIScrollView * scrollview = [[UIScrollView alloc] initWithFrame: self.view.bounds]; [scrollview addSubview: contentView]; scrollview .contentSi Ze = contentView.frame.size [self.view addSubview: scrollview];
Or
Just drag a UIScrollView into your xib file and put it .
In that scrollview, then in the code viewDidAppear simply set the contentSize of the scrollview scrollView.contentSize = contentView.frame.size;
If you need a full screen filled scrollview, set the frame of the scrollview before setting the content.
scrollView.frame = self.view.bounds;
Edit:. Just drag and drop a UIScrollView to your ViewController and such a system
Comments
Post a Comment