我正在使用两个故事板,第一个用于iphone Main_iPad.storyboard
,第二个用于if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main_iPad" bundle:nil];
EABaseRootVC *loginController = [storyboard instantiateViewControllerWithIdentifier:@"root2"];
UINavigationController *navController=[[UINavigationController alloc]initWithRootViewController:loginController];
self.window.rootViewController=navController;
}
else
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
EABaseRootVC *loginController = [storyboard instantiateViewControllerWithIdentifier:@"root"];
UINavigationController *navController=[[UINavigationController alloc]initWithRootViewController:loginController];
self.window.rootViewController=navController;
}
,我想分别为iPad和iPhone调用我正在使用此代码:
var mvcContext = context.Resource as
Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext;
if (mvcContext != null)
{
// Examine MVC specific things like routing data.
}
但它总是显示Main.storyboard的iPhone资产。
我已经关注此Different storyboards for iPhone and iPad in xcode 6
了如果您有任何其他想法,请建议我。 我做错了什么?