ios - (Solved) "Application windows are expected..." error when loading storyboard for Ipad -
i'm loading different storyboards iphone , ipad , iphone's storyboards load when start ipad simulator got "application windows expected..." error.
this code in appdelegate:
@implementation appdelegate - (uistoryboard *)grabstoryboard { uistoryboard *storyboard; // observe height of our screen int height = [uiscreen mainscreen].bounds.size.height; if (height == 480) { storyboard = [uistoryboard storyboardwithname:@"storyboard_iphone3" bundle:nil]; // nslog(@"device has 3.5inch display."); } if (height >= 1024 && height <= 2048 ) { storyboard = [uistoryboard storyboardwithname:@"storyboard_ipad" bundle:nil]; nslog(@"device has 4inch display."); } else { storyboard = [uistoryboard storyboardwithname:@"storyboard_iphone4up" bundle:nil]; // nslog(@"device has 4inch display."); } homecoming storyboard; } - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { uistoryboard *storyboard = [self grabstoryboard]; // show storyboard self.window.rootviewcontroller = [storyboard instantiateinitialviewcontroller]; [self.window makekeyandvisible]; homecoming yes; }
in console see nslog message storyboard doesn't load , "application windows..." error appears.
i'm using scroll views , elements thinkg not problem because there alternative them "adjust scroll view insets".
i uploaded screen shots show more project. time.
i figured out. when re-create stuff iphone storyboard ipad 1 initial view controller checkbox unchecked. check , (:
ios iphone xcode ipad storyboard
No comments:
Post a Comment