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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:43:55+00:00 2026-06-17T16:43:55+00:00

i have made changes in navigation bar means i have increasd the height of

  • 0

i have made changes in navigation bar means i have increasd the height of navigation bar & made some custom changes,it works fine but when i minimizes the application and again maximize it, it shows only original height that is what changes i made, those not works after minimization, my code is

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    NSLog(@" i m in didFinishLaunchingWithOptions" );



    [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"TopHeader"] forBarMetrics:UIBarMetricsDefault];
    [[UINavigationBar appearance] setFrame:CGRectMake(0, 0, 320, 55)];   

    [[UINavigationBar appearance] setTitleVerticalPositionAdjustment:(-15.0) forBarMetrics:UIBarMetricsDefault];

    [[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
                                                           [UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:245.0/255.0 alpha:1.0], UITextAttributeTextColor,
                                                           [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.8],UITextAttributeTextShadowColor,
                                                           [NSValue valueWithUIOffset:UIOffsetMake(0, 1)],
                                                           UITextAttributeTextShadowOffset,
                                                           [UIFont fontWithName:@"HelveticaNeue-CondensedBlack" size:16.0], UITextAttributeFont, nil]];

return YES;  
}

after maximize it goes to applicationDidBecomeActive thats why i put above code in applicationDidBecomeActive but its not working, why this is happening?
before minimize
enter image description here
after minimize & maximize again it looks like below i.e. height again automatically sets to 44.
enter image description here

Update: i written following code in applicationWillEnterForeground

- (void)applicationWillEnterForeground:(UIApplication *)application
{    
    UINavigationController *my=(UINavigationController *  )self.window.rootViewController;

    UINavigationBar *navigationBar = [my navigationBar];
    CGRect frame = [navigationBar frame];
    frame.size.height = 55.0f;
    [navigationBar setFrame:frame];

    NSLog(@" i m in applicationWillEnterForeground" );

   }

at the time of debugging when i writes its description it shows that height is 55. but on screen it still looks like second image. why this is happening.

  • 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-17T16:43:57+00:00Added an answer on June 17, 2026 at 4:43 pm

    I solved this problem, just overrides the UINavigationBar & in LayoutSubViews set the height of navigationBar.

    @implementation UINavigationBar (customNAvigBar)
    
    - (void)layoutSubviews
    {
        [self setFrame:CGRectMake(0, 0, 320, 55)];
    }
    
    @end
    

    that means whenever i draws the navigationBar it calls automatically & sets the height.

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

Sidebar

Related Questions

I have made some changes in one perforce client, but haven't submitted them. I
I have a Django-project which was running fine, until I made some changes I
I have recently made changes in some code that makes a char name field
I have subclass of UINavigationBar . @interface MyNavigationBar : UINavigationBar Made some changes and
I have inherited some ASP.NET web code which I have made changes to. It
I have recently made some changes to one of the subs within a form
My app has a custom background for the navigation bar. So i made a
Im have made a navigation bar for the top of site, the final look
I am doing NDK profiling for my project using android-ndk-profiler-3.1. I have made changes
I have a main branch with a file called app.js . I made changes

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.