objective c - Changing the first ViewController in iOS -
initially developed app 1 viewcontroller(called mainview). i'd add 1 viewcontroller (called loginview)infront of mainview. added in appdelegate
- (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { // override point customization after application launch. uistoryboard *mainstoryboard = [uistoryboard storyboardwithname:@"main" bundle:nil]; loginpage *rootviewcontroller = [mainstoryboard instantiateviewcontrollerwithidentifier:@"loginpage"]; [uiapplication sharedapplication].delegate.window.rootviewcontroller = rootviewcontroller; [[uiapplication sharedapplication].delegate.window makekeyandvisible]; return yes; }
it looks working, black screen appears. loginpage viewcontroller has following structure. viewcontroller has 2 buttons, 1 label , 1 text view. don't appear , black screen appearer.
Comments
Post a Comment