Note that there are some explanatory texts on larger screens.

plurals
  1. POImpossible to presentViewController
    text
    copied!<p>I've created a new application view based. Here some the main code:</p> <pre><code>// AppDelegate.h @interface AppDelegate : UIResponder &lt;UIApplicationDelegate&gt; { UINavigationController *navigationController; MIAPreferences *preferences; } @property (strong, nonatomic) UINavigationController *navigationController; @property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) MIAPreferences *preferences; // AppDelegate.m @implementation AppDelegate @synthesize window = _window; @synthesize navigationController; @synthesize preferences; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade]; // Override point for customization after application launch. UIViewController *rootController = [[HomeViewController alloc] initWithNibName:nil bundle:nil]; navigationController = [[UINavigationController alloc] initWithRootViewController:rootController]; navigationController.navigationBar.hidden = YES; self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; _window.rootViewController = navigationController; [self.window makeKeyAndVisible]; return YES; } // HomeViewController.m -(IBAction)openLogin { LoginViewController *view = [[LoginViewController alloc] initWithNibName:nil bundle:nil]; // 1 [self.navigationController presentViewController:view animated:YES completion:nil]; // 2 [self.navigationController pushViewController:view animated:YES]; // 3 [self presentViewController:view animated:YES completion:nil]; } </code></pre> <p>All 3 options returns a EXC_BAD_ACCESS (code=2, address=....)</p> <p>Can you please help me understand how to solve this?</p> <p><strong>UPDATE</strong></p> <p>The problem was due to a UIButton apparence set up during AddDelegate loading....but the first button was in the UIView I was going to load... that's why it crashed -.-"</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload