首页 > 移动平台 > 详细

iOS 判断设备为iPhone还是iPad

时间:2014-10-23 22:49:12      阅读:378      评论:0      收藏:0      [点我收藏+]
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        self.viewController = [[[_ViewController alloc] initWithNibName:@"_ViewController_iPhone" bundle:nil] autorelease];
    } else {
        self.viewController = [[[_ViewController alloc] initWithNibName:@"_ViewController_iPad" bundle:nil] autorelease];
    }<pre name="code" class="objc">self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];



iOS 判断设备为iPhone还是iPad

原文:http://blog.csdn.net/vaercly/article/details/40402873

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!