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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:11:58+00:00 2026-05-27T06:11:58+00:00

Here’re some view controller I have: tabBarController , navigationBarController , viewController , and imageView

  • 0

Here’re some view controller I have: tabBarController, navigationBarController, viewController, and imageView.
The hierarchy is that: tabBarController is the root controller, it includes navigationBarController. And the viewController(which is include the imageView) is pushed in by navigationBarController.

So the question is, when I touched the imageView, how to resize it to fullscreen with smooth animation. Note, I don’t want to hide NavigationBar & TabBar.
I tried it by setFrame, however, it is covered by navigationBarController and tabBarController.
I tried presentModalViewController: but it lose continuity.
I also tried to reset rootViewController to viewController, but the resulted with a broken animation. 🙁
Thanks for any suggestion!


Test code

UIViewController * viewController = [[UIViewController alloc] init];
[viewController.view setFrame:CGRectMake(0.0f, 0.0, 320.0f, 480.0f)];
[viewController.view setBackgroundColor:[UIColor redColor]];

UIImageView * imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)];
[imageView setBackgroundColor:[UIColor yellowColor]];
[imageView setUserInteractionEnabled:YES];
[viewController.view addSubview:imageView];
[imageView release];

UINavigationController * navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
[viewController release];

UIViewController * anotherTabViewController = [[UIViewController alloc] init];
[anotherTabViewController.view setFrame:CGRectMake(0.0f, 0.0, 320.0f, 480.0f)];
[anotherTabViewController.view setBackgroundColor:[UIColor blueColor]];

UITabBarController * tabBarController = [[UITabBarController alloc] init];
tabBarController.viewControllers = [NSArray arrayWithObjects:navigationController, anotherTabViewController, nil];
[navigationController release];
[anotherTabViewController release];

[self.window setRootViewController:tabBarController];

Here I write a simple code for testing. Now don’t care about the touch action. I wonder how to set the imageView to totally fullscreen(width:320, height:480). But it’s clipped by navigation bar and tab bar. I know the frame is relative to its super view. How to deal with this issue?

  • 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-27T06:11:59+00:00Added an answer on May 27, 2026 at 6:11 am

    try to add img to you window, when you need to resize it to full screen:

        UIImageView *img; //create new image
        img = yourImageView;
        [img setOrigin:CGPointMake(yourImageView.frame.origin.x, yourImageView.frame.origin.y+90)]; 
    //window size is bigger, so to set an image frame visionary at same place, you need to set origin point lower
        MOEAppDelegate *sharedAppDelegate = (MOEAppDelegate *)[[UIApplication sharedApplication] delegate];
        [sharedAppDelegate.window addSubview:img];
        [UIView animateWithDuration:1 
                         animations:^{
                             [img setFrame:CGRectMake(0, 
                                                      0, 
                                                      320, 
                                                      480)];
                         }];
    

    Note, that your self.view’s frame automatically resized when you adding tabBar or navigationBar, and in -(void)viewDidLoad it is NOT resized jet!

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

Sidebar

Related Questions

Here is an example: I have a file 1.js, which has some functions. I
Here is my situation: I have a controller action called OrderFromCategory which fills a
Here is the issue I am having: I have a large query that needs
Here's my scenario - I have an SSIS job that depends on another prior
Here is my problem : I have a post controller with the action create.
Here is my code (Say we have a single button on the page that
Here is my problem...I have a page that loads a list of clients and
Here's a basic regex technique that I've never managed to remember. Let's say I'm
Here's a problem I ran into recently. I have attributes strings of the form
Here is my code, which takes two version identifiers in the form 1, 5,

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.