iOs 5, initWithDecoder gets called before my custom init
===

I have a button. When you click on the button it will open up a new UITabBarController (pre-defined in toolbox).

This is the code:

    DealerView *view = [[DealerView alloc] initWithDealerId:976];
    [self.navigationController pushViewController:view animated:YES];

As you can see i use my own custom initializer to pass in an NSUInteger number to the UITabBarController.

Now inside my UITabBarController, i want to distribute this ID number to all children (all tabs in the tab-bar). I do this with this code:

    - (void)viewDidLoad
    {
        NSInteger i;
        for (i = 0; i < [self.childViewControllers count]; i++){
            DealerBaseView *item = (DealerBaseView*) [self.childViewControllers objectAtIndex:i];
            item.dealerId = self->dealerId;
        }
        
        [super viewDidLoad];
    	// Do any additional setup after loading the view.
    }

That way each child view can use this id number to get the correct database information inside their own viewDidLoad method.

**The problem is that self->dealerId is always 0.**

So i added some break points inside my code to see why self->dealerId always returns 0 (you can see that it's set in the initialization method).

    - (id) initWithDealerId:(NSUInteger)i{
        
        self = [super init];
        
        if (self){
            self->dealerId = i;
        }
        return self;
    }
    
    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
    {
        self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
        return self;
    }
    
    - (id) init{
        self = [super init];
        return self;
    }
    
    - (id) initWithCoder:(NSCoder *)aDecoder{
        self = [super initWithCoder:aDecoder];
        return self;
    }

Now it turns out that the order of things in this is the following:

 1. initWithCoder - UITabBarController
 2. viewDidLoad - UITabBarController
 3. viewDidLoad - Child tab of UITabBarController
 4. initWithNibName - UITabBarController
 5. viewDidLoad - UITabBarController (second time it hits this)
 6. initWithDealerId - UITabBarController

So my init method gets called lastly in this serie and thus the dealerId will always be 0. 

My question is simply. How can i set the dealerId so that it's available when viewDidLoad gets called for both the UITabVarController and UITabVarController items (all child items inside the tab controller)?