I have a main window (Window based application) and two different UIViewController. i am calling viewController1 in without any problem.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
}
there is a button on viewController1, when i press to button I want to remove viewController1 from mainWindow and add viewController2 without using navigation controller.
any help would be appreciated, many thanks.
You can use the
rootViewControllerproperty of theUIWindowobject. Create and set the first view controller as therootViewControllerinapplication:didFinishLaunchingWithOptions:method.And change it in the button tap method