I have a main navigationController controlled on the app’s delegate and this navigationController contains a RootViewController.
Inside this view controller I have defined a UISegmentedControl that is assigned to the toolbar, using something like:
[self.navigationController.toolbar addSubview:segmentedControl];
this segmentedControl has 3 segments, each one pushing a viewController.
The problem now is this: I want to show a view that will contain an iAd or AdMob ad and this view must be always be visible independently of which segmented is pushed by the segmentedControl.
Is it possible to add a view that is somehow on front of the segmented control and is not affected by the controls it pushes on screen? thanks
Another option would be to not use a NavigationController – don’t navigate – make the toolbar and the ad view space stable and swap out the contents.
That option would have a standard UIViewController with a UIToolbar at the top containing the segment control. Below that would be an addView and below that would be a content view where you could swap out views or layers based on the segment control selection.
That access pattern might not be appropriate for your app and data patterns but it does have the benefit of not navigating/pushing a completely new viewController.
From the UIView Programming Guide:
http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/CreatingViews/CreatingViews.html
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/occ/clm/UIView/transitionFromView:toView:duration:options:completion: