Sunday, September 29, 2013

[IPad] on the storyboard in popover segue to transfer data using a problem

segue election with the iPad Popover, such as A above a button after clicking popover out B, is not the only A can get B data, B A, no way to get some data ah?
Now A wants to send data to the popover point out viewcontrollor (B), but the A, B, ViewDidLoad prepareForSegue always called until after the results do not pass over the data. How to do that?
Reply:
You can set the properties of B prepareForSegue achieve

 
- (Void) prepareForSegue: (UIStoryboardSegue *) segue sender: (id) sender {

BViewController * destination = [segue destinationViewController];
destination.object = @ "aaaaaaaaaaa";

}


Reply:
4th Floor hjue reply quote:
can prepareForSegue set B attributes to achieve

Objective C code12345678-(void) prepareForSegue: (UIStoryboardSegue *) segue sender: (id) sender {BViewController * destination = [segue destinationViewControl ......

I tried this, this is always in the dest viewcontroller prepareForSegue ViewDidLoad execution until after the call, so not ah
Reply:
If you want to get to before the ViewDidLoad value, then your ideas are wrong, you should write your own init method, when the init parameter passing.
initWithxxx: (id) xxx

No comments:

Post a Comment