ios - Received an error when trying to check for storyboard in AppDelegate -
when trying test bounds correspond storyboards, received error "linker command failed exit code 1 (use -v see invocation)". looked few ways fix it, product>clean , running test program, neither worked. happened after implemented test used below. there other way fix this?
- (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { if(ui_user_interface_idiom() == uiuserinterfaceidiomphone){ uistoryboard *storyboard; cgsize result = [[uiscreen mainscreen] bounds].size; cgfloat scale = [uiscreen mainscreen].scale; result = cgsizemake(result.width * scale, result.height * scale); if(result.width == 960){ storyboard = [uistoryboard storyboardwithname:@"iphone4.xib" bundle:nil]; uiviewcontroller *initviewcontroller = [storyboard instantiateinitialviewcontroller]; [self.window setrootviewcontroller:initviewcontroller]; } } return yes;
edit: commented part out , still received error. leads me believe may come new xib created 4, i'm not sure.
edit 2: i've checked make sure added in build phases > compile sources , xib in copy bundle resources.
Comments
Post a Comment