我创建了从本地通知到 questionViewController 的重定向(在 appDelegate.m 中):
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil];
cysViewController *cvc =[sb instantiateViewControllerWithIdentifier:@"cysViewController"];
questionViewController *qvc = [sb instantiateViewControllerWithIdentifier:@"questionViewController"];
qvc.categoryId = @"339";
UINavigationController *nav = (UINavigationController *) self.window.rootViewController;
nav.viewControllers = [NSArray arrayWithObjects:cvc,qvc, nil];
[(UINavigationController *)self.window.rootViewController popToViewController:qvc animated:YES];
// back button appearance
[[UIBarButtonItem appearance] setTintColor:[UIColor colorWithRed:(107/255.0) green: (11/255.0) blue:(47/255.0) alpha:1]];
}
一切正常。显示返回项目并更改他的外观。我想更改后退按钮的标题,但我不知道该怎么做。我尝试了一些例子,但没有成功。有没有人有想法改变后退按钮的标题?