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 .
1 /* * 2 * Confirm Order selection return block3 */ 4 void (^ selectedaddressblock) (Hgaddressmodel * address);
b page, operation completed, to block callback value
1 /**2 * Select the line, in order to confirm the order, choose the delivery address to use3 */4- (void) TableView: (UITableView *) TableView Didselectrowatindexpath: (Nsindexpath *) Indexpath5 {6Hgaddressmodel *entity =Self.datasource[indexpath.row];7 if(self.selectedaddressblock) {8 Self.selectedaddressblock (entity);9 }Ten [Self.navigationcontroller Popviewcontrolleranimated:yes]; One}
A page operation is very simple, jump to the B page, directly call the Block B page we can get the results.
1- (void) Jumpaddress: (UIButton *) Sender {2Addresslistviewcontroller *address =[[Addresslistviewcontroller alloc] init];3address.hidesbottombarwhenpushed =YES;4Address.title =@"Address Management";5Address.selectedaddressblock = ^ (Hgaddressmodel *model) {6Dr_nslog (@"----------model------------%@", model.province_name);7 };8 [Self.navigationcontroller pushviewcontroller:address animated:yes];9}
OK, Finish.
iOS design mode-block implementation of proxy logic