ios - Set rootViewController of UINavigationController by method other than initWithRootViewController -


how set rootviewcontroller of uinavigationcontroller method other initwithrootviewcontroller?

i want use initwithnavigationbarclass:toolbarclass: deliver custom toolbar navigationcontroller, don't think can use initwithrootviewcontroller.

you can solve calling setviewcontrollers.

like this:

uinavigationcontroller *navigationcontroller = [[uinavigationcontroller alloc] initwithnavigationbarclass:[mynavigationbar class] toolbarclass:[uitoolbar class]];  [navigationcontroller setviewcontrollers:@[yourrootviewcontroller] animated:no]; 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -