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 8933401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:31:43+00:00 2026-06-15T09:31:43+00:00

My ViewController has a navigationBar with Promt and on top of it I’ve added

  • 0

My ViewController has a navigationBar with Promt and on top of it I’ve added a custom image:

- (void)changeNavBar
{
    UIImage *image = [UIImage imageNamed: @"logo_home.png"];
    imageView = [[UIImageView alloc] initWithImage:image];
    imageView.contentMode = UIViewContentModeLeft;

    [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"logo_home.png"] forBarMetrics:UIBarMetricsDefault];

    imageView.frame = CGRectMake(0, 0, 320, 70);

    [self.navigationController.navigationBar insertSubview:imageView atIndex:0];

    self.navigationController.navigationBar.backItem.backBarButtonItem.tintColor = [UIColor blackColor];
}

But when user clicks “Send Email” button, I create MFMailComposeViewController and present it modally.

- (IBAction)emailPressed:(id)sender
{
    NSString *emailTitle = event.title;
    NSString *messageBody = [NSString stringWithFormat:@"%@ - %@", event.title, event.concertUrl.absoluteString];

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

    mc.mailComposeDelegate = self;
    NSLog(@"subviews: %d", mc.navigationBar.subviews.count);

    [mc setSubject:emailTitle];
    [mc setMessageBody:messageBody isHTML:NO];

    // Present mail view controller on screen
    [self presentModalViewController:mc animated:YES];
}

MFMailComposeViewController‘s navigation bar autoresizes to normal navigationBar without prompt, but my custom image from previous VC doesn’t disappear. How can I remove it and set standard Black style to my navigationBar ?

  • 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-06-15T09:31:44+00:00Added an answer on June 15, 2026 at 9:31 am

    You have used UIAppearance proxy to set background image which will have effect on every navigation bar in app.

    Change

    [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"logo_home.png"] forBarMetrics:UIBarMetricsDefault];
    

    with

    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"logo_home.png"] forBarMetrics:UIBarMetricsDefault];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to have a ViewController that has a table view on the top
My ViewController has a dataSource , which in my case has to fetch the
I have a ViewController that has its own NIB. I would like to embed
I've got a view that has a table view inside. I've got a viewController
So, i got this Navigation-based App (with a custom NavigationBar - Category) and I
I'm developing a iphone app that has a main viewcontroller(UITabBarController) with UINavigationControllers in each
I have a UINavigationBar with two different screens. On both screens the NavigationBar has
I'm drawing a custom UIView that is sitting inside a xib whose ViewController is
I have implemented a custom UINavigationbar using this code (placed in the top of
My app has a custom background for the navigation bar. So i made a

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.