I have problem with UISplitViewController, everything work on iOS version 11 & 12 (before iOS 13).
But in iOS 13, ViewDidLoad on Primary View ViewDidLoad not called, while I need this because when User make changes on secondary view, code will change Primary View.
Can you help me to find solution?
Answers
I test on iPhone simulator (iOS 13 )with the official sample : https://docs.microsoft.com/en-us/samples/xamarin/ios-samples/splitview/ , it works fine without your problem , the method
ViewDidLoad
called on both on SplitViewController and Primary View , could you test the sample first?ColeX, Thanks for your response.
I forgot to say, that the childs view is UINavigationController.
It is run correcly if I add UIViewController as Childs.
PrimaryView _primaryView = new PrimaryView(); SecondaryView _secondaryView = new SecondaryView(); ViewControllers = new UIViewController[] {_primaryView, _secondaryView};
Code above is run correcly.
But right now I use UINavigationController as Childs. This is snippet of my code:
PrimaryView _primaryView = new PrimaryView(); UINavigationController _primaryNav = new UINavigationController(_primaryView); SecondaryView _secondaryView = new SecondaryView(); UINavigationController _secondaryNav = new UINavigationController(_secondaryView); ViewControllers = new UIViewController[] {_primaryNav, _secondaryNav};
That code not call the ViewDidLoad on PrimaryView.
It works fine with the Navigation as child view ,check my sample .
@ColeX , I already test you sample, it not call the ViewDidLoad (MasterTableView's ViewDidLoad).
Do you run it on landscape mode or portait mode?
iPhone simulator on portait mode.
@ColeX, I run it with iPad simulator in portait mode, it did not call ViewDidLoad. But when I run on landscape mode everything run.
The PrimaryView (table viewController) is always presented in landscape , so the ViewDidLoad would be called at first.
In portait mode PrimaryView is hidden at first ,ViewDidLoad would be triggered when you right swipe to show the table , maybe apple changes the initial time of PrimaryView on iOS13.
I faced the same issue and can confirm the case.
After update from SDK 12 to 13, the behaviour of ViewDidLoad() call changed specifically when the app built with SDK 13 and launched on iPad with iOS 12 in portrait mode. ViewDidLoad() called on the first PrimaryView appearance.
The issue does not exist when the app launched on iPad with iOS 13.