您的位置:首页 > 其它

YJUtilsUserInterfaceIdiom

2016-01-30 18:15 232 查看
//
//  YJUtilsUserInterfaceIdiom.swift
//  Utils
//
//  CSDN:http://blog.csdn.net/y550918116j
//  GitHub:https://github.com/937447974/Blog
//
//  Created by yangjun on 16/1/14.
//  Copyright © 2016年 阳君. All rights reserved.
//

import UIKit

/// user interface
public struct YJUtilsUserInterfaceIdiom {

/// The user interface should be designed for iPhone and iPod touch.
static let isPhone = UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.Phone
/// The user interface should be designed for iPad.
static let isPad = UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.Pad
/// The user interface should be designed for Apple TV.
static let isAppleTV = UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.TV

}


Appendix

Sample Code

Swift

Revision History

时间描述
2016-01-30博文完成

Copyright

CSDN:http://blog.csdn.net/y550918116j

GitHub:https://github.com/937447974/Blog
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: