ios - Change initial viewcontroller in AppDelegate swift -


i have created first swift app, single viewcontroller setted in appdelegate function:

func application(application: uiapplication, didfinishlaunchingwithoptions launchoptions: [nsobject: anyobject]?) -> bool {   var tablevc:friendstableviewcontroller = friendstableviewcontroller(classname: "friend")     tablevc.title = "friendfamz"      uinavigationbar.appearance().tintcolor = uicolor(red: 0.05, green: 0.47, blue: 0.91, alpha: 1.0)     uinavigationbar.appearance().bartintcolor = uicolor(red: 0.05, green: 0.47, blue: 0.91, alpha: 1.0)     uinavigationbar.appearance().titletextattributes = [nsforegroundcolorattributename: uicolor.whitecolor()]     uiapplication.sharedapplication().statusbarstyle = uistatusbarstyle.lightcontent       var navigationvc:uinavigationcontroller = uinavigationcontroller(rootviewcontroller: tablevc)      let frame = uiscreen.mainscreen().bounds     window = uiwindow(frame: frame)      window!.rootviewcontroller = navigationvc     window!.makekeyandvisible() 

now i'd change first view of app: i'd create login view (with login viewcontroller), don't know how create view call friendtableviewcontroller...

anyone able help? great, i've been blocked hours... lot

the easiest way go settings , set initial view first view.

if using storyboard, can hold control , click 1 view another. name segue.

in login, if it's successful perform segue identifier. there's hundreds of tutorial on this.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -