rudensm
rudensm

Reputation: 1474

Invalid UINavigationBar appearance when open iMessage within an app

After setting

UINavigationBar.appearance.barTintColor = COLOR_TINT;

i got this appearance launching iMessage within an app

enter image description here

Upvotes: 0

Views: 205

Answers (3)

FreeSpinach
FreeSpinach

Reputation: 11

UINavigationBar.appearance.barTintColor = nil; 

should set before initialization. Like this:

UINavigationBar.appearance.barTintColor = nil;
MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init];

Upvotes: 1

KudoCC
KudoCC

Reputation: 6952

It seems that you don't want your MFMessageComposeViewController don't have the same appearance.

Before present your Message ViewController, set barTintColor to default Color which is nil.

UINavigationBar.appearance.barTintColor = nil ;

and recover your barTintColor after MFMessageComposeViewController is dismissed.

- (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result
{
    [self dismissModalViewControllerAnimated:YES] ;
    UINavigationBar.appearance.barTintColor = COLOR_TINT ;
}

Upvotes: 0

allemattio
allemattio

Reputation: 1848

Do you set the bar tint in the app delegate?

try setting the tint in every controller instead...

Upvotes: 0

Related Questions