UIDevice.currentDevice().performSelector(
"setOrientation:",
withObject:UIInterfaceOrientation.LandscapeRight
)
有如上代码 后面 withObject 的参数是一个 AnyObject 类型的,这样直接传的话会报错,试过几种方法都不行,求大神帮忙。T T
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
改传
UIInterfaceOrientation.LandscapeRight.rawValue
id 对应 AnyObject?, 你定义一个带?的var试验下: