- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
{
CGSize result = [[UIScreen mainScreen] bounds].size;
if(result.height == 480)
{
// iPhone Classic
NSLog(@"iPhone 4");
}
if(result.height == 568)
{
// iPhone 5
NSLog(@"iPhone 5");
}
}
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
SideMenuViewController *leftMenuViewController = [[SideMenuViewController alloc] init];
ContainerOfSideMenuByVeerViewController *container = [ContainerOfSideMenuByVeerViewController
containerWithCenterViewController:[self navigationController]
leftMenuViewController:leftMenuViewController];
self.window.rootViewController = container;
[self.window makeKeyAndVisible];
return YES;
}
我想更改 leftMenuViewController 中存在的 NSString 的值并重新加载它,以便我可以根据新数据更改逻辑。
我想更改每个控制器中的 NSString ,但我无法这样做,因为 leftMenuViewController 从 didFinishLauchingWithOption 开始,它只加载一次。
我怎样才能做到这一点?