objective c - loading data after loading view in iphone application -
hi new objective c. trying create login system app.
here how story board looks like:
i using afnetworking classes , rest php library talk data.
now can see created navigations first app using push, modal , navigation.
where stucked
when user click on sign in button in app app first authorise user , take user find places view.
what need when click on sign in button, first place finder view open , call function display data of places using rest api eith json format.
- (ibaction)signin:(id)sender { [self performseguewithidentifier:@"landingview" sender:sender]; } - (void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender { if ([[segue identifier] isequaltostring:@"landingview"]) { // here call function -"display_place" of class -"showplaces"???? } }
i hope can idea if going right or should next?
thanks
you can use destinationviewcontroller property segue:
- (void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender { if ([[segue identifier] isequaltostring:@"landingview"]) { [((showplaces *)segue.destinationviewcontroller) display_places]; } }
by way, not using proper naming of classes , functions... should take @ other examples , tutorials see how code style objective c.
Comments
Post a Comment