跳到主要内容

获取设备类型 (device.type)

声明​

设备类型 = device.type()

返回值​

  • 设备类型
    文本型,形如 "iPhone3,1"、"iPad13,1" 的机型标识字符串

说明​

获取设备类型
该函数可在 XUI 中使用

示例​

if device.type() == "iPhone3,1" then
-- 是 iPhone 4
end