I have a UIViewCOntroller and i have added a lot of UI components to it, labels, text fields, etc..
Now, i need to add some more fields to it. and i have figured out that i don't have any space in my viewcontroller to add any. So i was thinking of adding a scrollView to solve this problem. Is there away where i could add my UIViewController which is holding all the UI components to a UIScrollView.
How can i do this programatically ?
For exemple if you are in A viewController methode :
UIViewController * v = [[UIViewController alloc] init];
UIScrollView * sc = [[UIScrollView alloc] init];
...use setFrame for v and sc frames
[sc setScrollEnabled:YES];
[sc setContentSize:2000];
[sc addSubview:v.view];
[self.view addSubview:sc];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With