futuretap/InAppSettingsKit — Issue #121: Switching on which View to load via IASKViewControllerClass key
Author: jasonkerner
Created: 2011-12-09 13:43:17+00:00
State: open

In my root.inapp.plist file, I originally had the IASKViewControllerClass and IASKViewControllerSelector keys set to load my view controller for a particular view. However, I want to now load a different subview based upon a preference setting (logged in or not) and rather create the view programmatically each time (as I have a different pre/post UI elements), it would be be useful to check a preference and then load the view.

What I've done is set IASKViewControllerClass and IASKViewControllerSelector for that particular Settings menu bar option to an intermediate class that switches on the particular UserDefaults key and then decides what NIB file to load. Its not working though.

My intermediate class is a subview of UIViewController (to allow it to push the new view onto the stack) but I think the IASK is seeing my intermediate class as the UIView to load and pushs a blank, black screen, instead of my NIB file (derived from the switch/if statement).

Is there a way to achieve what I'm trying to do?