Reputation: 105
I working on a iPAD only app which requires me to split the screen such a way that:
(1) there are 2 parts on the screen divided vertically
(2) On the left side, user can communicate using a chat
(3) On the right side, user can see continuous streaming data
I am not sure (A) how can I do two tasks simultaneously (B)how to split the screen (is Split view the way to achieve both of these?)
Thank you.
Upvotes: 0
Views: 993
Reputation: 8184
Take RootViewController and inside its
-(void)viewDidLoad:
UIView *viewOne = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 512, 768)];
UIView *viewTwo = [[UIView alloc]initWithFrame:CGRectMake(512, 0, 512, 768)];
[[self view]addSubview:viewOne];
[[self view]addSubview:viewTwo];
And you can add anything inside viewOne or viewTwo.
Upvotes: 0
Reputation: 1079
A splitViewController
is great for having two view controllers (or rather the views that belong to them) onscreen at the same time. Usually you see this for master-detail apps, where left you get a table view in which you select a row that gets displayed in detail on the right. Nothing stops you from using this in your own way.
Upvotes: 1