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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:52:56+00:00 2026-05-12T20:52:56+00:00

Greetings! I have a working iPhone app (huzzah!) that uses a MainView.xib containing a

  • 0

Greetings! I have a working iPhone app (huzzah!) that uses a MainView.xib containing a fully-stocked UITabBar with several UINavigationController objects and views at-the-ready.

I’ve now been asked to add a one-time registration view to this mix. This view would appear before the UITabBar at app-launch, get some info from the user, register with a server – or check for an existing registration, then squirrel some data away in the keychain. (If the keychain already shows proof of registration, then we skip showing this particular view.)

The registration and keychain part I’ve got under control (thank you Erica Sadun for the latter!), but showing that initial one-time view is proving to be trickier than I expected.

I suspect I’m too close to the problem to see what’s wrong. I really hope it’s pilot error and doesn’t require anything too Rube Goldberg!

Here’s the scenario:

The app starts by loading MainView.xib, in which lies the aforementioned UITabBar controller, et. al. For the sake of argument, let’s say we must show that registration view. Also, we’d like it to have a modal appearance, so it will fly in from the bottom up. Then, when we’re done, we can dismiss it, call a delegate (most likely the App Delegate) and tell it to carry on with the original UITabBar.

// Normally, the Tab Bar Controller's view is added to the window ... still do this?
[window addSubview:tabBarController.view];

// We could now set up a VC like so. Mostly harmless. (I know, "mvc" is an unfortunate abbreviation in this case.)
RegistrationVC *mvc = [[RegistrationVC alloc] initWithNibName:@"RegistrationView" bundle:nil];

Note that RegistrationView.xib has a UIView inside, but no nav controller. We want to keep it decoupled so that it can be reused, say, as part of a tab bar item’s nav controller (to review your registration info, for instance).

Moving on. We create a nav controller with the intent of presenting things modally:

UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:mvc];

We then present our modal VC, using the tab bar controller as the basis, and release the alloc’ed bits.

[tabBarController presentModalViewController:nc animated:YES];
[nc release];
[mvc release];

First observation. Something tells me this is just plain sloppy. You can see the first tab bar item’s nav bar and view appear just as the modal view swoops in. Yeccch! Moreover, trying to set the selected VC to nil beforehand has no effect:

 tabBarController.selectedViewController = nil;

We really don’t want/need to use the tab bar until after the modal VC is done (and we have the delegate to help let us know when that happens).

Why am I even bothering with the Tab Bar? Well, it looks like I need something to hang that modal VC’s hat on, and I don’t know what else there is to use.

Is this the only way? It just seems to tether the Registration VC and the Tab Bar unnecessarily, and it just smells … wrong.

Clues welcome/appreciated!

  • 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-12T20:52:56+00:00Added an answer on May 12, 2026 at 8:52 pm

    It’s hard to answer this without knowing what your Default.png shows. Assuming you’re following the HIG and it displays an empty tabBarController, I’d suggest a somewhat complicated layering:
    bottom view: tabBarController.view
    middle view: UIImageView: Default.png
    top view: registration view positioned below the bottom of the screen

    On startup, if you need to show the registration view, manually animate it upward, and once the animation is done remove the UIImageView below it. When registration is complete, manually animate the registration view downward to reveal the tabBarController. If on startup you don’t need the registration view, just animate the UIImageView to fade away (or just remove it).

    OTOH hand, if you’re not following the HIG and instead showing some kind of splash screen, things get a bit easier. Layer like this:
    bottom view: tabBarController.view
    top view: UIImageView: Default.png

    If you need to show registration, do presentModalViewController with animated:NO and then fade out the UIImageView. If not, just fade out the UIImageView.

    That’s a lengthy explanation w/o pictures, hope it makes sense. The salient point is that I’m suggesting adding a UIImageView:Default.png to be the first thing that is seen when the app starts, and use that to guide your transition into registration or tabBarController as appropriate.

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

Sidebar

Related Questions

Greetings: I have put together a RESTful web service in .NET 3.5 that takes
Greetings! I have an XML value that I'd like to use as a boolean
Greetings, Apologies in advance that I have not researched this toughly enough to answer
Greetings, I have a particular object which can be constructed from a file, as
Greetings. I have been looking at Literate Programming a bit now, and I do
Greetings! If I have XML such as this: <Root> <AlphaSection> . . . </AlphaSection>
Greetings! I have some XML like this: <Root> <AlphaSection> . . . </AlphaSection> <BetaSection>
Greetings! I have a DropDownList within a FormView which are bound to XmlDataSources: <asp:FormView
Greetings, I have data stored on mysql with delimiter , in 1 table. I
Greetings! I have some XML like this: <Root> <MainSection> <SomeNode>Some Node Value</SomeNode> <SomeOtherNode>Some Other

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.