Guest User

Untitled

a guest
May 14th, 2012
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. presenting modal view from app delegate unbalanced calls to begin/end appearance
  2. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  3.  
  4. self.window.rootViewController = self.tabBarController;
  5. [self.window makeKeyAndVisible];
  6.  
  7.  
  8. Security *security = [[Security alloc] initWithNibName:@"Security" bundle:nil];
  9. [self.tabBarController.selectedViewController presentModalViewController:security animated:YES];
  10. [security release];
  11.  
  12. return YES;
  13.  
  14. Unbalanced calls to begin/end appearance transitions for <UITabBarController: 0x171320>.
  15.  
  16. -(BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController {
  17.  
  18. if (viewController == [tabBarController.viewControllers objectAtIndex:2]) {
  19.  
  20. //The Log Out tab locks the app by presenting a modalviewcontroller that can't be dismissed unless there is a password.
  21. Security *security = [[Security alloc] initWithNibName:@"Security" bundle:nil];
  22. [self.tabBarController presentModalViewController:security animated:YES];
  23. [security release];
  24. return NO;
  25.  
  26. } else {
  27.  
  28. return YES;
  29. }
  30. }
  31.  
  32. [self presentModalViewController:security animated:YES];
  33.  
  34. [self.navigationController presentModalViewController:security animated:YES];
Advertisement
Add Comment
Please, Sign In to add comment