IPhone SDK 3.0 in the application - change the color of the navigation bar

My application uses the new email feature for iPhone SDK 3.0.

I want to change the hue of the email interface to black and make it translucent.

I tried the following code,

/* picker.navigationController.navigationBar.tintColor = [UIColor blackColor]; picker.navigationController.navigationBar.translucent = YES ; */ 

But it changes the color of the created view,

 MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; 

create a window, not create a window yourself.

Is it possible? Or should we stick with Apple providing blue color ???

+6
iphone cocoa-touch
source share
5 answers

Since MFMailComposeViewController is a subclass of UINavigationController, simply do the following:

 [[picker navigationBar] setTintColor:[UIColor redColor]]; 
+5
source share

IPhone manuals for iPhone do not prohibit the use of custom colors, but recommend standard colors (blue and black).

+1
source share

Yes it is possible.

Just add the objective-c category to the UINavigationBar class by overriding the drawInRect method. So you may want.

The downside is that all of your navigation bars will change :)

0
source share

You can also try this code ....

 MFMailComposeViewController *mailComposeView = [[MFMailComposeViewController alloc] init]; mailComposeView.navigationBar.tintColor = [UIColor cyanColor]; 
0
source share

[[Navigation CollectorBar] setTintColor: [UIColor blackColor]];

.... makes the cancel and send buttons black too. They are not blue and do not change color when pressed.

0
source share

All Articles