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

  • Home
  • SEARCH
  • 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 9138725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:17:40+00:00 2026-06-17T09:17:40+00:00

Below code is perfectly working fine iOS 5, but not on iOS 6 or

  • 0

Below code is perfectly working fine iOS 5, but not on iOS 6 or above.
What I want that for Email composer sheet the navigationBar image will be different then other UINavigationBar classes. I can’t understand that debug pointer is responding the appearance method but on device it shows navigationBar image as “bgNavigationBar.png”; expected is “bgNavigationBar_2.png”.

Please guide me…….

if ([[UINavigationBar class]respondsToSelector:@selector(appearance)]) {
    UIImage *logoImage44 = [[UIImage imageNamed:@"bgNavigationBar.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [[UINavigationBar appearance] setBackgroundImage:logoImage44 forBarMetrics:UIBarMetricsDefault];

    UIImage *ImagePlain = [[UIImage imageNamed:@"bgNavigationBar_2.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [[UINavigationBar appearanceWhenContainedIn:[MFMailComposeViewController class], nil] setBackgroundImage:ImagePlain forBarMetrics:UIBarMetricsDefault];
}
  • 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-17T09:17:40+00:00Added an answer on June 17, 2026 at 9:17 am

    This thing is not working in ios6.

    [[UINavigationBar appearanceWhenContainedIn:[MFMessageComposeViewController class], nil] setBackgroundImage:[UIImage imageNamed:@"bgNavigationBar_2.png"] forBarMetrics:UIBarMetricsDefault];
    

    Just you need to set this property in your Mail Handler Class.

    if (![[UINavigationBar class]respondsToSelector:@selector(appearance)])
    {
        UIView *backgroundView = [[[UIView alloc] initWithFrame:CGRectMake(0,0,320,44)]autorelease];
    
        [backgroundView setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"bgNavigationBar_2.png"]]];
        controller.topViewController.navigationItem.titleView = backgroundView ;
    }
    else
    {
        UIImage *gradientImagePlain = [[UIImage imageNamed:@"bgNavigationBar_2.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
        [[UINavigationBar appearance] setBackgroundImage:gradientImagePlain forBarMetrics:UIBarMetricsDefault];
    }
    

    and then reset another image for all other navigation controller’s background image.

    - (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result
    {
        [self.parentController dismissModalViewControllerAnimated:YES];
        UIImage *gradientImagePlain = [[UIImage imageNamed:@"bgNavigationBar.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
        [[UINavigationBar appearance] setBackgroundImage:gradientImagePlain forBarMetrics:UIBarMetricsDefault];
    }
    

    Hope this will work for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Below code not work, but it's work fine for jsf1.2. Now the framework is
The below code was working perfectly fine on master-slave replication datastore and broke after
The following script below is not running in IE7 but works perfectly fine in
the below mentioned code is working perfectly, that when clicking the thumbnail the larger
The below is my code. All my button functions are working perfectly, but if
I am using the below code to block the taskbar which is working perfectly.
I am using below code to show jquery dialog, its working perfectly, Sub OpenDialog(ByVal
I have used this below code before and was working perfectly. When I use
So I have to admit, that I had this code working perfectly up until
The below code works perfect on XAMPP on my PC, but does not work

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.