When using Navigationviewcontroller for page jumps, you should use the Pushviewcontroller method to jump to the next page, so the next page is also in the Navigationviewcontroller container.
1. Skip to the next page:
- Alonesetprizeviewcontroller *setprize = [[Alonesetprizeviewcontroller alloc] init];
- To jump page <span style= "font-family:arial, Helvetica, Sans-serif;" > Alonesetprizeviewcontroller has an attribute dictionary1 is a nsmutabledictionary type of container </span>
- [Setprize. Dictionary1 setobject:[self. txtpasswd text] forkey:alone_siteprize_pwd];
- Use Pushviewcontroller to jump to the next page
- [self. Navigationcontroller pushviewcontroller:setprize animated:true];
2, from the current page to return to the previous page and pass the value of the past:
- This page already exists in Self.navigationController.viewControllers and is the previous page of the current page
- Alonesetsiteviewcontroller *SETPRIZEVC = [self. Navigationcontroller. Viewcontrollers Objectatindex: self. Navigationcontroller. Viewcontrollers. count-2];
- Initialize its properties
- Setprizevc. Dictionary = Nil;
- Passing parameters Past
- Setprizevc. Dictionary = [nsmutabledictionary dictionarywithdictionary:self. Dictionary1];
- Use Poptoviewcontroller to return and pass a value to the previous page
- [self. Navigationcontroller POPTOVIEWCONTROLLER:SETPRIZEVC animated:true];
After you return to the previous page, the previous page is displayed after you receive the parameters and refresh. Note that this should be done in Viewdidappear and receive the passed values:
- -(void) Viewdidappear: (BOOL) animated
- {
- //Judge and receive the returned parameters
- }
3, return from the current page to the previous page (no value) method:
- Go back to the previous interface
- -(Ibaction) Backoff: (ID) Sender
- {
- [self. Navigationcontroller popviewcontrolleranimated:true];
- }
Ios--navigationviewcontroller jump, return pass value