Because Apple's Game Center view can override Chartboost activity, you can use the rootView to show interstitials in a separate view. (SDK version 3.2+.)
For example: Let's say we have a two-view loading sequence with a loading view and a menu view of type MenuView. We can set the Chartboost rootView to an instance of MenuView. After that, the interstitial will prerender for the MenuView view only, regardless of when
showInterstitial was called. No interstitials will appear until the MenuView view is displayed.
It's as simple as
[Chartboost sharedChartboost].rootView = gameMenu; where
gameMenu is an already initialized instance of MenuView.
Be sure to set the rootView to 'nil' once you switch away from the view currently set as the rootView. If you miss this step, interstitials will NOT display anywhere else in your game!
Setting the rootView to nil is as easy as
[Chartboost sharedChartboost].rootView = nil;
- The rootView frame should be the same size as the window
- The rootView should be the first responder in the view hierarchy