@denispersin

Как сделать переход между несколькими UIMasterViewController в UISplitViewController?

Подскажите пожалуйста, как с помощью Storyboard можно сделать переход между несколькими MasterViewController, например как в Mail, по такому алгоритму:
Категории (Основное меню) -> Подкатегории -> Обновление DetailViewController

Не могу найти похожий пример или описание.
  • Вопрос задан
  • 2423 просмотра
Пригласить эксперта
Ответы на вопрос 1
@denispersin Автор вопроса
Нашёл ответ на stackoverflow.com

Если не поможет, вернусь сюда.

Ответ:
When using story boarding, if you want to have multiple table views so it will allow the user to drill down, you must use the Push Segue (set it to master). Make sure you are not pushing a Navigation controller and just the view you want listed. Then, to get back just use [self.navigationcontroller popViewControllerAnimated:YES]; to get back.

EDIT: (more info as asked for) So in XCode/IB when you are on your main view and right click and drag it to another view, you will be presented with different choices. You want to select Push instead of Modal. This will allow it to push a new view onto the stack. You can also set it's destination to Master and it will size the IB view correctly. Also, you don't always have to use a button to connect a view. You can also drag from the view controller itself to another view controller instead of a button to view controller. Then in your button code you can call [self performSegueWithIdentifier:@"someNameHere" sender:self]; to call the transition. This lets you do checks and validation before you move on to the next screen. Just remember to click on your segue and name it (under identifier in the properties view). Then add the function prepareForSegue:sender: in order to transfer any variables or anything before it transfers (I rarely have to use this).

-David
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы