The main view of my iPad app is a TabBarController. Each Tab contains a UISplitViewController.
The UISplitViewController contains UINavigationControllers.
How do I change the tab's BadgeValue from a ViewController located within a UISplitViewController.
I've tried setting the TabBarItem property of the ViewController but there is no effect.
Strangely the UIViewContoller's NavigationController and SplitViewController property's are null even though the UIViewContoller is in a NavigationController which is in a SplitViewController .
Summary: The Heirarchy looks like this:
tabbar
splitview
navigation
viewcontroller
Found it.
A TabBarController's tabbar is accessed by the direct child, in this case the SplitController.
Because the SplitController doesn't get loaded until the tab is pressed, you have to set the badge when you create the tabbarcontroller (a custom one).
theSplitController.TabBarItem.BadgeValue = items.Count().ToString();