I need to create an app wich features a login/singup form and then a custom Google Map. I am new to iOS programming and trying to learn the things needed for this app very fast.
So, I have created the frontend and the backend of the login form, it works. I have an action wich is triggered by the "Log in" button wich verifies the credentials and either trigger a error either presents the Google Map.
I want to show that Google Map in another view controller wich controls another xib file. I created the view controller and the xib file.
My question is how can I load another view controller from an action placed in the implementation file of the current view controller?
Now, I have this code:
UIViewController *mapViewController =
[[BSTGMapViewController alloc] initWithNibName:@"BSTGMapViewController"
bundle:nil];
How can I make it the "root view controller" of the window and maybe featuring a transition (considering my logic is ok :D) ?
If you want to open the
ViewController
from another one then you should define it like this in yourIBAction
. It is good idea to make theviewController
as property though.FirstViewController.h
FirstViewController.m
You should make a viewController as
rootViewController
in yourAppDelegate
class something like this