当使用下面的行
时,我会遇到致命的错误[actionSheet showInView:[self.view window]];
有人请告诉我我在做什么错误?
UIView *actionview = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 450)];
[actionview setBackgroundColor:[UIColor grayColor]];
actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil];
[actionSheet setActionSheetStyle:UIActionSheetStyleBlackTranslucent];
[actionSheet showInView:self.view];
[actionSheet setBounds:CGRectMake(0, 0, 320, 390)];
[actionSheet addSubview:[self createToolbar:@"Test"]];
picker = [[UIPickerView alloc] init];
picker.frame = CGRectMake(0, 44, 320, 162);
picker.showsSelectionIndicator = YES;
picker.dataSource = self;
picker.delegate = self;
[actionSheet addSubview:picker];
错误是:
错误:CGContextSetFillColorWithColor:无效的上下文0x0。这是一个严重的错误。该应用程序或其使用的库正在使用无效的上下文,从而导致系统稳定性和可靠性的整体降低。此通知是礼貌的:请解决此问题。在即将到来的更新中,它将成为一个致命的错误。