iPhone: Little Problem with View-Hierarchy

Hi There,

I've build a little UIViewController with it's views for blending the screen of my app to black with alpha.

I take the View, add it as a subview, bring it to front end tell my controller to startAnimating.

This works fine in a demo-project but in the "real world" I have to call it from inside of a Navigation Controller.
So what happend:
Only the actual View is blendend - without the NavigationBar

I've testet it to invoke directly at the app-dalegate:

ActivityViewController *actvie = [[ActivityViewController alloc] init];
[window addSubview:[actvie view]];
[window bringSubviewToFront:[actvie view]];
[actvie startAnimating];

this does the right thing.

Could someone tell me, how to push the view controller from within a View on the NavigationControllers stack tho the highest hierarchy?

Sorry for this bad english.

Thanks all
Chris

Message was edited by: Silversurfer01

MBP Late 2008, Mac OS X (10.5.7)

Posted on May 23, 2009 9:04 AM

Reply
2 replies

May 23, 2009 6:20 PM in response to Silversurfer01

I think you're asking _how to fade the entire screen to black_, including the nav bar. Is that correct? If not, the following will be irrelevant, but I'll go ahead and answer the question as I restated it:

Nav bars don't like to be covered up by child views, and I think the nav bar controller is designed to operate accordingly.

One exception to the above is a modal view, which will always cover both the nav bar and any tab bar as well. So you might try bringing up a transparent modal view, then animate a fade to black in that view. If that provides the effect you want it might be the best approach, since you'll avoid trying to make the nav controller do something it's not intended to do.

Hope that helps!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

iPhone: Little Problem with View-Hierarchy

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.