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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:52:58+00:00 2026-06-10T20:52:58+00:00

I haven’t found anything corresponding to my situation so far… FYI, I’m developing for

  • 0

I haven’t found anything corresponding to my situation so far…

FYI, I’m developing for iOS 5, using a storyboard.

I have a tab bar controller with 2 views in it (let’s call them tab 1 and tab 2). I also have a separate landscape view, with no tab bar, which is used any time the device rotates during the application use. I use a segue launched manually in shouldAutorotateToInterfaceOrientation to switch to and from this view. I also use a NSString in the landscape view to know which tab I am coming from, to go back to correct one when I go back to portrait. So far, this works fine. I can go to and from landscape mode exactly the way I want.

My problem is :

When I launch the app, in portrait, I see the tab bar. If I go to landscape, it disappears. This is fine, that’s what I did in my storyboard. But when I go back to portrait, the tab bar does not come back ! That’s the problem.

Edit : code calling the rotation

I stopped using shouldAutorotateToInterfaceOrientation to rotate because it was conflicting with the custom segues. The problem with the tab bar was here before, so this is not the issue. I use didRotate instead.

Here is the code from FirstViewController.m (same code in SecondViewController.m, changing my segue identifier) :

-(void)didRotate:(NSNotification *)notification
{ 
    UIInterfaceOrientation newOrientation =  [[UIDevice currentDevice] orientation];
    if ((newOrientation == UIInterfaceOrientationLandscapeLeft || newOrientation == UIInterfaceOrientationLandscapeRight)) 
    {
        [self performSegueWithIdentifier: @"Page1ToLandscapeSegue" sender: self];
    }
}

And from LandscapeViewController.m (previousView is a NSString, set before going to landscape, so I know which view I’m coming from) :

-(void)didRotate:(NSNotification *)notification
{ 
    UIInterfaceOrientation newOrientation =  [[UIDevice currentDevice] orientation];
    if (newOrientation == UIInterfaceOrientationPortrait)
    {
        if ([previousView isEqualToString: @"View1"]) {
            [self performSegueWithIdentifier: @"LandscapeToPage1Segue" 
                                      sender: self];
        }

        else if ([previousView isEqualToString: @"View2"]) {
            [self performSegueWithIdentifier: @"LandscapeToPage2Segue" 
                                      sender: self];
        }
    }
}
  • 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-10T20:52:59+00:00Added an answer on June 10, 2026 at 8:52 pm

    Looking at your comments I’m thinking that your tab bar is disappearing because you’re seguing from a view controller that is not embedded in a tab bar controller (this being your landscape view view controller), I’d suggest the following:

    1) It seems complicated to setup segues to go back to the previous view, not to mention that you’re creating more views/controllers and adding them to the stack, so discard the segues that go back to your original views.

    2) Make the segues to the landscape view be modal, that way you won’t have the tab bar show up when you segue to them, if you use push it will be embedded in the tab bar controller.

    3) Since the landscape view would be a modal view, simply call this method in your rotate code in the landscapes view controller:

    [[self presentingViewController] dismissModalViewControllerAnimated:YES];

    This will push the view off the stack and go back to the view it came from.

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

Sidebar

Related Questions

Haven't seen anything, but I have seen that you can create albums in the
Haven't found what i'm looking for so far. I want to redirect all my
I haven't found a solution yet in StackOverlfow to my problem. I'm using nl2br()
Haven't found a solution to this problem yet, have tried some things... I have
Haven't seen anything about it here but it seems to solve one of the
I haven't found a straight answer to how to make an animation in a
I haven't found a coherent answer to my quesion here :( My server's ISP
I haven't seen this question anywhere else, I hope someone can help. I have
I haven't found any documentation on this or seen this done before, but is
I haven't worked with SQL Reporting much, however I have been trying to get

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.