내 앱을 사용자 정의하는 동안 너무 좌절감을 느낍니다. Navigation bar, toolbar, tabBar 등 거의 모든 앱을 만들고 스타일을 지정했지만, MFMailComposeViewController, MFMessageComposerViewController, Twitter 또는 Facebook 공유자 또는 QuickLook View Controller가 재생 될 때마다 앱과 메시지가 충돌합니다 :UIA 보류 및 다양한 충돌
*** Assertion failure in -[UICGColor encodeWithCoder:].
*** Terminating app due to uncaught exception 'NSInternalInconsistencyExceptionì, reason: 'Only RGBA or White color spaces are supported in this situation.'
나는 아이폰 OS 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];
}
}
당신의하는 .m 파일에서 당신의 .H 파일에서 외관
- (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"]];
}
이 시도 https://www.google.co.in/search?hl=en&noj=1&q=Assertion+failure+in+-[UICGColor+encodeWithCoder%3A]&oq=Assertion+failure+in+-[UICGColor+encodeWithCoder % 3A] & gs_l = serp.12 ... 5126.5126.0.6834.1.1.0.0.0.0.124.124.0j1.1.0 .... 0 ... 1c.1.26.serp..1.0.0.wx9jBNE9LbA – Spynet
이미 시험해 보았습니다. 그것으로, 나는 구글을 사용할 수있다. 그러나 그것에서 어떤 수정도 찾지 못했다. – Phillip