I couldn’t find any tutorial that i could understand about switching views but i found out that i can switch them by changing the window’s rootViewController property.
The problem is my other view has 2 UITableViews in it, but they don’t respond to swipes when the controller just became the rootViewController, but after i turn my ipad 90 degrees the view changes to landscape then it starts to work.
Can anyone tell me how to make them work when the view is loaded?
You can’t change directly the
windows rootViewController propertyand have it to work, because the system doesn’t get notify that that change occurred. That is why the change took effect only when the system asked for that view again.You need to use a method to change it. Depending on your architecture you may want to use a method from UIViewController
UINavigationController :
UIView :