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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:01:45+00:00 2026-05-27T19:01:45+00:00

I have a custom image header ABOVE the uinavigationbar. I do this with this

  • 0

I have a custom image header ABOVE the uinavigationbar. I do this with this code:

self.navController.view.frame = CGRectMake(0.0, 0.0, 320.0, 480.0); 
self.navController.navigationBar.frame = CGRectMake(0.0, 73.0, 320.0, 44.0);

UIView *checkNav = [self.navController.view viewWithTag:9999];
if (checkNav == nil) {
    UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"header-logo.jpg"]];
    imgView.tag = 9999;
    [imgView setFrame:CGRectMake(0.0, 23.0, 320.0, 50.0)];
    [self.navController.view addSubview:imgView];
}

This works great. But, when the app goes inactive (hit the main iphone home button) and then you go back into the app, the uinavigationbar shifts up to the default place at the top of the screen and is hidden behind my custom header image.

I’ve tried throwing code into applicationDidBecomeActive, but it doesn’t help. Any help would be greatly appreciated.

Thanks!

  • 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-27T19:01:46+00:00Added an answer on May 27, 2026 at 7:01 pm

    You do get warned about this in the docs:

    With only a few exceptions, you should never modify the navigation bar object directly. It is permissible to modify the barStyle or translucent properties of the navigation bar but you must never change its frame, bounds, or alpha values directly

    Having said that, you should be able to get the effect by repeating your above code in applicationDidBecomeActive or applicationWillEnterForeground, assuming you have a pointer to the navigation controller from there. You may find that hiding and re-showing the navigation bar is required (bit of a hack, but it can help – I had a similar problem with hiding / showing the status bar and the navigation bar not going to its correct place)

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

Sidebar

Related Questions

I have a view based table with a custom cell view. Inside this custom
I have a custom image file where the first block of data is ASCII
I have a custom UITableViewCell which has an image & and some text. When
I have a custom list, and I've added a 'Page Image' field by clicking
I have a custom Image class that I am using to store individual image
I have few custom controls (image views) added programmatically to table cell. I want
I have a custom control extending Image, and I will put some more data
i am confused with custom background image in section. i have set an custom
I need to make a custom ListView with multiple view types. I found this
I have an error trying to use $(document).ready() as in the above image. What

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.