swift - How can I switch views programmatically in a view controller? (Xcode, iPhone) -


have been struggling while, , can never seem direct answer.

any appreciated!

if you're in navigation controller:

viewcontroller *viewcontroller = [[viewcontroller alloc] init]; [self.navigationcontroller pushviewcontroller:viewcontroller animated:yes]; 

or if want present new view:

viewcontroller *viewcontroller = [[viewcontroller alloc] init];     [self presentviewcontroller:viewcontroller animated:yes completion:nil]; 

Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -