Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5843659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:11:06+00:00 2026-05-22T12:11:06+00:00

I have customize my UINavigationBar with UINavigationBar drawRect and it is working fine until

  • 0

I have customize my UINavigationBar with UINavigationBar drawRect and it is working fine until I fire up MFMailComposeViewController, which gives me a trouble as I couldn’t override UIBarButton for the mail class, it create akward view like below:

enter image description here

While I try to prevent the MFMailComposeViewController and produce code below for using the default drawRect for MFMailComposeViewController, it even worse it create a black UIBar:

enter image description here

The Code:

@implementation UINavigationBar (CustomImage)
- (void)drawRect:(CGRect)rect {


    //Prevent Mail Controller For Customizing NavigationBar
    for (UIView* next = [self superview]; next; next = next.superview) {
        UIResponder* nextResponder = [next nextResponder];
        if ([nextResponder isKindOfClass:[MFMailComposeViewController class]]) {
            [super drawRect:rect];
            return;
        }
    }

    UIImage *image = [UIImage imageNamed: @"titleBar.png"];
    [image drawInRect:CGRectMake(0, 0, 320, 44)];   

}
@end

What I am trying to do here is to make sure MFMailComposeViewController having the same style of UINavigationBar and UIButtonItem. It can be either way:

1) Both UINavigationBar and UIButtonItem have customized background

2) Default UINavigationBar style (gradient blue)

Would like to know can I achieve this? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:11:07+00:00Added an answer on May 22, 2026 at 12:11 pm

    After some hacking and testing, still not manage to customize the button. But this is the closest I can get, by setting the tint color of mail controller.

    MFMailComposeViewController *mailController = [[MFMailComposeViewController alloc] init];
    mailController.mailComposeDelegate = self;
    mailController.navigationBar.tintColor = [UIColor brownColor];  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have the following code to customize UINavigationController : @implementation UINavigationBar (UINavigationBarCategory) - (void)drawRect:(CGRect)rect
I have a Universal App in which I customize my UINavigationBar. In my iPhone
We have a web portal product from which we customize portals from customers. We
I have a complex Dot in WPF which I need to customize the diameter.
Does any one have tried to customize default section index displayed in UITableView. I
I have a 1920x1200 screen an would like to customize VS2008 code windows to
I have a class A that inherits UITableViewCell (to customize a table cell). It
I have mp3 catalog portal and I want to customize my urls. I used
Is it possible to customize a django application to have accept localized date format
I have tons of ajax components on this booking engine. I need to customize

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.