के लिए उपस्थिति संक्रमण शुरू/अंत करने के लिए असंतुलित कॉल मेरे पास एक UITabBarController है, जब प्रारंभिक रन, मैं एक लॉगिन व्यू कंट्रोलर ओवरले करना चाहता हूं लेकिन त्रुटि प्राप्त हुई।UITabBarController
< UITabBarController: 0x863ae00> के लिए उपस्थिति संक्रमण शुरू/समाप्ति के लिए असंतुलित कॉल।
नीचे कोड है।
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
UIViewController *lessonVC = [[[LessonViewController alloc] initWithNibName:@"LessonViewController" bundle:nil] autorelease];
UIViewController *programVC = [[[ProgramViewController alloc] initWithNibName:@"ProgramViewController" bundle:nil] autorelease];
UIViewController *flashcardVC = [[[FlashCardViewController alloc] initWithNibName:@"FlashCardViewController" bundle:nil] autorelease];
UIViewController *moreVC = [[[MoreViewController alloc] initWithNibName:@"MoreViewController" bundle:nil] autorelease];
UINavigationController *lessonNVC = [[[UINavigationController alloc] initWithRootViewController:lessonVC] autorelease];
UINavigationController *programNVC = [[[UINavigationController alloc] initWithRootViewController:programVC] autorelease];
UINavigationController *flashcardNVC = [[[UINavigationController alloc] initWithRootViewController:flashcardVC] autorelease];
UINavigationController *moreNVC = [[[UINavigationController alloc] initWithRootViewController:moreVC] autorelease];
self.tabBarController = [[[UITabBarController alloc] init/*WithNibName:nil bundle:nil*/] autorelease];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:lessonNVC, programNVC, flashcardNVC, moreNVC, nil];
self.tabBarController.selectedIndex = 0;
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
if (![[ZYHttpRequest sharedRequest] userID])
{
// should register or login firstly
LoginViewController *loginVC = [[LoginViewController alloc] initWithNibName:@"LoginViewController"
bundle:nil];
loginVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self.tabBarController presentModalViewController:loginVC animated:YES];
ZY_SAFE_RELEASE(loginVC);
}
return YES;
}
कोई भी जो मेरी मदद कर सकता है? अग्रिम में धन्यवाद!
इसके अलावा, मैंने इसे [http://stackoverflow.com/q/7886096/527539] चेक किया है। लेकिन कोई भाग्य नहीं है। – ZYiOS