On the A page, click Jump to B page, b page finished, go back to a page, and refresh the content of a page. A typical example is in a list, click Add, jump to the new page, add up, send the data back to the list page, and refresh the contents of the list page.
This, I usually through the agent to achieve, the following try to achieve through the block.
Block is defined on page b for call to a page.
/* * * */ void (^ selectedaddressblock) (Hgaddressmodel * address);
b page, operation completed, to block callback value
/* * * */-(void) TableView: (UITableView *) TableView Didselectrowatindexpath: (Nsindexpath *) indexpath{ *entity = Self.datasource[indexpath.row]; if (self.selectedaddressblock) { self.selectedaddressblock (entity); } [Self.navigationcontroller Popviewcontrolleranimated:yes];}
A page operation is very simple, jump to the B page, directly call the B-page block will be able to get the results.
-(void) jumpaddress: (UIButton *) Sender { *address = [[Addresslistviewcontroller alloc] Init ]; = YES; @" Address Management " ; = ^ (Hgaddressmodel *model) { Dr_nslog (@ "----------model------------%@" , model.province_name); }; [Self.navigationcontroller pushviewcontroller:address animated:yes];}
OK, Finish.
IOS design mode-block implementation of proxy logic