Hi I want to create an applicatio开发者_运维百科n with a similar home screen to Photovine.
It seems to have the parent view, but within the parent view it has a sort of subview which you can scroll through, Just wondering how this is done.
I don't know the Photovine, but what you are searching for might be UIScrollView. You can always add a subview to another view. If you want subview to be scrollable, you can use UIScrollView or one of its implementation (UITableView etc.)
Programatically you would do this as follows:
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
scrollView.contentSize = CGSizeMake(1000, 1000);
[mainView addSubview:scrollView];
Here I created UIScrollView of size 300x300 with content of size 1000x1000. You must define content size. If you want UIScrollView to be scrollable, content size must exceed UIScrollView's.
EDIT: To lock scrolling to page, you can use
scrollView.pagingEnabled = YES;
精彩评论