-(void)changeViewControllerWithResult:(NSDictionary *)result{
[BusyIndicatotUtility hideHUDInController:self];
TimeBoxViewController *timeBoxVC = [self.storyboard instantiateViewControllerWithIdentifier:@"timeBoxViewController"];
backItem.title = @"Back";//字符串可随便定义或为nil
backItem.target = self;
backItem.action = @selector(back:);//此处定义的back:方法根本不会被执行,原因见下面解释,所以可以省略不写
self.navigationItem.backBarButtonItem = backItem;
}
[self.navigationController popViewControllerAnimated:YES];
}
[BusyIndicatotUtility hideHUDInController:self];
TimeBoxViewController *timeBoxVC = [self.storyboard instantiateViewControllerWithIdentifier:@"timeBoxViewController"];
viewController.resultForInitTime = result;
#pragma mark - 下一个VC即timeBoxVC的naviBar 返回按钮如果想用系统默认自带的“<”箭头,则可在[self.navigationController pushViewController:timeBoxVC animated:YES]这个方法之前 添加以下代码;或者在storyBoard中 设置navigationBarTitle的下方 添加back Item :为“Back”;
#warning - 此方法必须写在push方法之前 && 此方法设置的不是当前VC NaviBarItem,而是要pushto的那个VC的返回按钮
backItem.title = @"Back";//字符串可随便定义或为nil
backItem.target = self;
backItem.action = @selector(back:);//此处定义的back:方法根本不会被执行,原因见下面解释,所以可以省略不写
self.navigationItem.backBarButtonItem = backItem;
#pragma mark
}
#warning - self.navigationItem.backBarButtonItem的@selector方法 系统默认的是返回上一页即 [self.navigationController popViewControllerAnimated:YES]; 如果想在这里改为popTo指定的VC, 则实现不了。。因为 注意:程序根本不会走下面这个我自己添加的- (void)back:(id)sender方法,所以里面的内容方法也不会实现。。。如果下一页的返回按钮想popto指定的VC,我所能会的只能是自定义leftBarButtonItem
//此方法根本不会被执行
[self.navigationController popViewControllerAnimated:YES];
}