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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:58:58+00:00 2026-06-06T15:58:58+00:00

I have a tab bar controller in the master view of a split view

  • 0

I have a tab bar controller in the master view of a split view controller. I add a subview to that tab bar controller to show some information. I don’t use a modal view because I don’t want modal behavior and I need that subview to show inside the master view.

The display of this information view may be triggered by any of several other view controllers, depending on what is being shown at the time. (For example, tapping a cell in a list of a disclosure button on a map.)

Occasionally, when I dismiss this information subview, the view shown by the tab bar controller is blank. It is typically solid back or white. I can switch tabs, and when I get back to the tab I was at, the view is drawn properly.

I want to try using the setNeedsDisplay method on the view, so I tried this inside my tab bar controller class:

- (void) redrawCurrentTab {
    UIView *currentView = [[self.viewControllers objectAtIndex:self.selectedIndex] view];
    [currentView setNeedsDisplay];
}

I checked that the value of currentView is correct for the view that should be shown. But the view is not being redrawn as I was hoping.

So I have two problems that I can see:

  1. I may not understand how setNeedsDisplay works.
  2. I’m looking for advice on a better way to accomplish this showing of the information view rather than as a subview of the tab bar controller.
  • 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-06T15:58:59+00:00Added an answer on June 6, 2026 at 3:58 pm
    // This is a hack, because the current tab is disappearing when the details view is withdrawn.
    // So it needs to cycle to another view and then back.
    - (void) redrawCurrentTab {
        if (currentIndex == 0) 
            self.selectedIndex = 1;
        else
            self.selectedIndex = 0;
        self.selectedIndex = currentIndex;
    }
    

    currentIndex is set in the delegate method tabBarController:didSelectViewController:

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

Sidebar

Related Questions

I have a tab bar controller and some nav controllers containing view controllers. In
I have a tab bar driven app. The app has some view controllers that
I have a tab bar controller view that loads a record from an api
I have a complicated structure where I have a custom tab-bar controller that houses
I have a tab bar controller with a view inside a navigation controller. One
I have a tab bar controller that I have created programmatically, named TPastJourneyTabbar .
I have a tab bar controller with five buttons. That controller has a tab
I have a tab bar controller with different view controllers all using the same
I have an app that is built starting from a tab bar controller. It's
I have an app that I just got setup with a split view controller

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.