我正在嘗試使用背景漸變,導航欄和徽標來製作基本應用程序。當在模擬器的錯誤彈出推出,說跳板發射失敗錯誤:-3模擬器意外退出給出錯誤,Springboard未能啓動錯誤:-3
我在代碼中使用以下兩種中的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];
}
它不能是你的代碼......同時建立出事了...... 乾淨和建設? – Injectios
或通過退出重新啓動您的模擬器並再次打開它。 –
@Injectios - 即使在建立一個乾淨的,它給出相同的錯誤。 – killswitch