Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simulator quits unexpectedly giving error, Springboard failed to launch error: -3

I am trying to make a basic Application with a background Gradient, Navigation Bar and a logo on it. When Launched in a simulator an error pops up, saying Springboard failed to launch error: -3

I am Using the Following two in code in the ViewController:-

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.navigationItem.title = @"Menu";
    UIView *view = [[UIView alloc]initWithFrame:CGRectMake(257, 3, 320, 44)];
    UIImageView *image = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"ic_home.png"]];
    [image setFrame:CGRectMake(0, 0, 59, 36)];
    [view addSubview:image];
    [self.navigationController.navigationBar addSubview:view];
}


- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    //Add gradient background
    CAGradientLayer *bgLayer = [BackgroundLayer yellowGradient];
    bgLayer.frame = self.view.bounds;
    [self.view.layer insertSublayer:bgLayer atIndex:0];
}
like image 602
killswitch Avatar asked Sep 13 '25 18:09

killswitch


1 Answers

not sure if this is the most technical answer but still...

Injectios is right, it's not your code (or at least my code never causes that) it's something to do with interface builder/putting files onto the simulator (from my experience).

Simply change the device that your building for and then switch back (for example, if developing for the 3.5" iPhone screen, click the 4" simulator and run, once it builds stop it and switch back to your target device) If you are using xcode 5 the list of devices is on the same toolbar as your Run and Stop buttons or go Product -> Destination

hope it helps

like image 67
blindman457 Avatar answered Sep 16 '25 10:09

blindman457