Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-05-2012, 12:51 PM   #1 (permalink)
Registered Member
 
Join Date: Jul 2010
Posts: 142
sleaver is on a distinguished road
Default View hierarchy's & UINavigationController

I'm trying to currently implement ViewDeck and although that isn't a problem, the viewWillAppear method of the view controller is! I'm creating the ViewDeck with the following code:

Code:
UIViewController *viewController1 = [[CombinedNewsViewController alloc] initWithNibName:@"CombinedNewsViewController" bundle:nil];
    
    if (VIEWDECK_ENABLED) { 
        UIViewController *selectorController = [[NewsNavigationMenuViewController alloc] init];
        
        IIViewDeckController* deckController = [[IIViewDeckController alloc] initWithCenterViewController:viewController1 leftViewController:selectorController];
        deckController.navigationControllerBehavior = IIViewDeckNavigationControllerIntegrated;
        viewController1 = deckController;
    }
    viewController1 = [[UINavigationController alloc] initWithRootViewController:viewController1];
    
    if (TABBAR_ENABLED) {
        self.tabController = [[UITabBarController alloc] init];
        self.tabController.viewControllers = [NSArray arrayWithObjects:viewController1, nil];
        self.window.rootViewController = self.tabController;
    }
    else {
        self.window.rootViewController = viewController1;
    }
    
    [window makeKeyAndVisible];
    
    return YES;
The viewWillAppear method of the UIViewController isn't being called and I understand why because viewWillAppear is only called on the top most view, which in the above is the navigation controller.

The view hirarchy needs to be as per above otherwise hidesBottomBarWhenPushed doesn't work and I obviously don't want to put all my code in viewDidLoad. Therefore is there any may of passing a call down the view hierarchy so that viewWillAppear of the UIViewController is called? I don't want to call it manually because things start to go wrong, very wrong!

For some reason this one really has me stumped, so if there is a way, please make it as clear as possible
sleaver is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 401
18 members and 383 guests
Apptronics RBC, Atatator, chiataytuday, dre, FrankWeller, gwelmarten, ipodphone, jeroenkeij, jleannex55, kukat, LunarMoon, MAMN84, n00b, pbart, reficul, Retouchable, Sami Gh, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,124
Posts: 402,909
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:14 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0