ios - Segue launching but viewDidLoad not firing for new ViewController -
i have little issue launching segue code.
what want in app:
- logs website post call.
- when gets successful response login attempt calls function change vc
performseguewithidentifier
call. - when new view controller loads populates webview page site app logged into
so far getting far segue call. calls can pushes new vc (or somewhere @ least), gets rid of image being displayed old vc, doesn't cause new view controller populate webview.
code calling function:
.... success:^(afhttprequestoperation *operation, id responseobject){ ... [self blah]; ... } ....
code in function:
- (void)blah{ [self performseguewithidentifier: @"tomap" sender: self]; nslog(@"segue map"); }
code in viewdidload
of new vc.
- (void)viewdidload{ [super viewdidload]; // additional setup after loading view. nslog(@"mapviewcontroller"); nsstring *urladdressformap = @"this link map goes"; nsurl *urlformap = [nsurl urlwithstring:urladdressformap]; nsurlrequest *loadmap = [nsurlrequest requestwithurl:urlformap]; [mywebview loadrequest:loadmap]; }
this function not being fired segue. know not getting fired because not see output form line in logs: nslog(@"mapviewcontroller");
in storyboard, select mapviewcontroller, click on identity inspector. first item should custom class, , class name should set name of mapviewcontroller class.
Comments
Post a Comment