caldera.sac
caldera.sac

Reputation: 5108

Is it possible to implement a split view for ipads by using existing view controllers

I'm building an universal app. I have already created two view controllers.in first view controller there is a search from and when user entered the data and hit the search button in the second view controller it shows the results.now what I want is to create a split view using these two views.

  1. Is it possibel? if it is posstible how can I do that and can we implement it only for portrait mode.(without landscape mode).
  2. Do we have to use a tableview as master view each and every time when we create a split view ?

hope your help with this.thank you very much.

Upvotes: 0

Views: 58

Answers (1)

Peter Cetinski
Peter Cetinski

Reputation: 2336

UISplitViewController does pretty much everything you ask. If there is enough space it will display your view controllers side-by-side (see the preferredDisplayMode property). If you really want to force a side-by-side view controller arrangement in a confined space (ie. portrait), which is probably not advisable from a UX perspective, then you will need to write your own custom split view controller. Just layout 2 view controllers inside a parent view controller side-by-side and give each of them equal widths.

Also, you do not have to use a UITableView for your master view in a UISplitViewController. Each view controller in completely customizable.

Upvotes: 1

Related Questions