应用程序在 iOS11 中使 RGBA 崩溃,在 iOS10 及以下工作正常

App crashes RGBA in iOS 11 working fine in iOS10 and below

当我打开图像选择器并选择图库时,应用程序在 iOS 11 中崩溃,但它在 iOS 10 及以下

中工作正常

018-02-22 14:42:53.630334+0530[589:98531] * -[UICGColor encodeWithCoder:] 断言失败, 2018-02-22 14:42:53.631850+0530[589:98531] * 由于未捕获的异常 'NSInternalInconsistencyException' 而终止应用程序,原因:'Only RGBA or White color spaces are supported in this situation.'

UIAlertController *actionSheet = [UIAlertController alertControllerWithTitle:nil message:@"Choose From" preferredStyle:UIAlertControllerStyleActionSheet];

[actionSheet addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {

 // Cancel button tappped.
      [self dismissViewControllerAnimated:YES completion:^{
        }];
    }]];

    [actionSheet addAction:[UIAlertAction actionWithTitle:@"Gallery" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
        UIImagePickerController *imgpicker = [[UIImagePickerController alloc] init];
        imgpicker.allowsEditing = YES;
        imgpicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
        imgpicker.delegate=(id)self;
        [self presentViewController:imgpicker animated:YES completion:nil];

 }]];

这不是因为图像选择器等等。

这只是因为UITabbar我给Tabbar分配了背景图。我刚刚删除它现在工作正常。