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];
}
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With