Reputation: 1140
Device iPhone 6+(support split view in landscape mode)
I am using split view controller and I have an issue in it. In portrait mode, when i print child view controllers of split view, It shows only one view controller(primary view controller). While in landscape mode, It works fine.
Can anyone help me to get the root cause.
In Portrait mode:
(lldb) po self.splitViewController.viewControllers
<__NSArrayI 0x7fb5ec528e70>(
<UINavigationController: 0x7fb5ec148850>
)
In landscape mode:
(lldb) po self.splitViewController.viewControllers
<__NSArrayI 0x7fc0b2eaf910>(
<UINavigationController: 0x7fc0b2a2e100>,
<UINavigationController: 0x7fc0b09b0600>
)
Thanks,
Upvotes: 2
Views: 621
Reputation: 1586
This is how the UISplitViewController
is supposed to work.
When the split view interface is expanded, this property contains two view controllers; when it is collapsed, this property contains only one view controller. The first view controller in the array is always the primary (or master) view controller. If a second view controller is present, that view controller is the secondary (or detail) view controller.
Upvotes: 0