i'm using monotouch c# write iphone app number of different screens. keep things simple describe few screens lead controller having issues with.
the problem having receive error message when create class inherits uitabbarcontroller:
application windows expected have root view controller @ end of application launch
in appdelegate class initialise uiviewcontroller , uinavigationcontroller. set rootviewcontroller on uiwindow object use navigation controller this:
var splashcontroller = new splashcontroller(); // uiviewcontroller _navigationcontroller = new uinavigationcontroller(splashcontroller); ... _window = new uiwindow(uiscreen.mainscreen.bounds); _window.rootviewcontroller = _navigationcontroller; _window.makekeyandvisible(); up until haven't had issue running applications. created new class inherits uitabbarcontroller , error message described above. can post code if needs i've tried running application empty class inherits uitabbarcontroller , still receive same error message.
even if class never gets called in code through commenting out or deleting pushviewcontroller call still can't run application.
the call tab bar controller this:
splashcontroller (uiviewcontroller) > push > homecontroller (uiviewcontroller) > push > menucontroller (dialogviewcontroller) > push > statscontroller (uitabbarcontroller) i'm guessing there's missing here after googling , searching around couldn't find answer problem. help
if using uitabbarcontroller should this:
window = new uiwindow (uiscreen.mainscreen.bounds); var viewcontroller1 = new firstviewcontroller (); var viewcontroller2 = new secondviewcontroller (); tabbarcontroller = new uitabbarcontroller (); tabbarcontroller.viewcontrollers = new uiviewcontroller [] { viewcontroller1, viewcontroller2, }; window.rootviewcontroller = tabbarcontroller; window.makekeyandvisible (); the uitabbarcontroller should rootviewcontroller.
Comments
Post a Comment