Reputation: 1
I can make a view with a UIScrollView
without problemas, but I can't understand how to make a View
with a UIScrollView
and insert it in a UITabBarController
.
I'm starting with iOS now...
Upvotes: 0
Views: 1184
Reputation: 4164
In you view controller you will need to add the following code to create a ScrollView
UIScrollView *srcv = [[UIScrollView alloc] initWithFrame:self.view.frame];
self.view = srcv;
//Add your elements to srcv
[srcv setContentSize:CGSizeMake(x,y)]; //Where x and y are your dimensions that will allow this to scroll
Upvotes: 0
Reputation: 385670
A UITabBarController
doesn't deal with child views directly. It deals with child view controllers. You need a view controller to be in charge of your scroll view, and you tell the tab bar controller about the view controller.
If you don't understand what view controllers are for or how to make your own view controller, you need to work through some iOS programming tutorials.
Upvotes: 1