函数:getOrientation 获取屏幕方向

函数名称:获取屏幕方向

函数功能:获取屏幕是横屏还是竖屏

函数方法

rotate = getOrientation();

必填

选填

返回值

返回值 类型 说明
rotate number 屏幕方向,1 - 横屏;2 - 竖屏

函数用例

--此函数仅支持 iOS
rotate = getOrientation(); 
if rotate  == 1 then
    nLog("横屏")
else
    nLog("竖屏")
end
Copyright 北京帮你玩科技有限公司 2024 all right reserved,powered by Gitbook该文章修订时间: 2025-03-04 15:43:41

results matching ""

    No results matching ""