This is what I want to achieve.
|------------------------------------------------------|
| view 1 here |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| view 2 here |
| |
| |
| |
| |
| |
| |
| |
| view 3 here |
| |
| |
| |
| |
| |
| |
| |
| -----------------------------------------------------|
I want to have a scrollview with 3 views in it. I am doing the following.
-(void)viewDidLoad
{
keeperView = [[UIView alloc] init];
aanvallerView = [[UIView alloc] init];
middenvelderView = [[UIView alloc] init];
listView.contentSize=CGSizeMake(1280,2360);
[listView addSubview:keeperView];
[listView addSubview:aanvallerView];
[listView addSubview:middenvelderView];
}
But it only shows one view. Does anybody knows what the problem is?
Kind regards and thanks in advance.
In your viewDidLoadMethod:
Result:
All 3 Views are on the Scrollview! 🙂
By using addSubview, you can now put all the things you wish on the views 😉
You could even make another scrollview with a scrollview ^^