UIApperance и различные аварии

я так расстроен, настраивая мое приложение. Я'Мы уже создали и разработали почти все приложение, включая панель навигации, панель инструментов, панель вкладок и т. д., но каждый раз, когда в игру вступают MFMailComposeViewController, MFMessageComposerViewController, Twitter или Facebook или даже QuickLook View Controller, приложение вылетает с сообщением: I '

*** Assertion failure in -[UICGColor encodeWithCoder:].
*** Terminating app due to uncaught exception 'NSInternalInconsistencyExceptionì, reason: 'Only RGBA or White color spaces are supported in this situation.'

мы читали, что это связано с тем, что iOS 6 управляет композиторами как удаленными контроллерами, но я действительноЯ не знаю, как решить эту проблему.

Я неиз-за этого я не хочу удалять функции составления писем или составления сообщений.

Кто-нибудь тоже сталкивался с этой ошибкой?

Я уже код написал. Проблема в том, что UIAppearance вызывает сбой приложения из-за пользовательских элементов UINavigationBars. Код.

-(void)message{
    if (_progressHUD){
        [_progressHUD hide:YES];
    }
    MFMessageComposeViewController *controller = [[MFMessageComposeViewController alloc] init] ;
    [controller setMessageComposeDelegate:self];

    if([MFMessageComposeViewController canSendText])
    {
        controller.body = descriptionString;
        controller.recipients = nil;
        [self presentViewController:controller animated:YES completion:nil];
    }

}

-(void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result{
    [self dismissViewControllerAnimated:YES completion:nil];
}

-(void)email {

    if (_progressHUD){
        [_progressHUD hide:YES];
    }

    MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init];
    [composer setMailComposeDelegate:self];
    if ([MFMailComposeViewController canSendMail]) {
        [composer setToRecipients:nil];
        [composer setSubject:[NSString stringWithFormat:@"%@",nameString]];

        [composer setMessageBody:[NSString stringWithFormat:@"%@",descriptionString] isHTML:NO];        [composer addAttachmentData:[NSData dataWithContentsOfURL:[NSURL URLWithString:imageString]] mimeType:@"png" fileName:imageString];
        [composer setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
        [self presentViewController:composer animated:YES completion:nil];
    }
}


-(void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error {
    if (error) {
        SIAlertView *alert = [[SIAlertView alloc] initWithTitle:@"Error"
                                                        andMessage:[NSString stringWithFormat:@"Error %@", [error description]]];
        [alert addButtonWithTitle:@"OK" type:SIAlertViewButtonTypeDestructive handler:^(SIAlertView *alertView){}];
        [alert show];
        [self dismissViewControllerAnimated:YES completion:nil];
    }
    else {
        [self dismissViewControllerAnimated:YES completion:nil];
    }
}

Внешность

- (void)customizeAppearance
{
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

    UINavigationBar Appearance
    [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"navigationBarBackground"] forBarMetrics:UIBarMetricsDefault];
    [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
    [[UINavigationBar appearance] setTitleTextAttributes:
     [NSDictionary dictionaryWithObjectsAndKeys:
      [UIColor whiteColor],
      UITextAttributeTextColor,
      [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.0],
      UITextAttributeTextShadowColor,
      [NSValue valueWithUIOffset:UIOffsetMake(0, -1)],
      UITextAttributeTextShadowOffset,
      [UIFont fontWithName:@"HelveticaNeue" size:0.0],
      UITextAttributeFont,
      nil]];

    //ToolBar Appearance
    [[UIToolbar appearance] setTintColor:[UIColor whiteColor]];


    //Switch Appearance
    [[UISwitch appearance] setOnTintColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"greenBackground"]]];

    //Search Bar Appearance
    [[UISearchBar appearance] setTintColor:[UIColor whiteColor]];

    //Tab Bar Appearance
    [[UITabBar appearance] setBackgroundImage:[UIImage imageNamed:@"tabBarBackground"]];
    [[UITabBar appearance] setTintColor:[UIColor whiteColor]];
    [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor], UITextAttributeTextColor, nil] forState:UIControlStateNormal];
    [[UITabBar appearance] setSelectionIndicatorImage:[UIImage imageNamed:@"transparent"]];

}

Ответы на вопрос(3)

Ваш ответ на вопрос