我有一个场景,我必须旋转我的模拟器,而xcode ui测试正在进行.
要旋转模拟器,我使用以下代码
UIDevice.currentDevice().orientation
let value = UIInterfaceOrientation.LandscapeLeft.rawValue
UIDevice.currentDevice().setValue(value, forKey: "orientation")
Run Code Online (Sandbox Code Playgroud)
但它不起作用.
有没有解决方案在xcode ui测试中使用swift代码旋转模拟器?
谢谢
我已经搜索了很多,但找不到有用的链接来使用 xcode 8 中的 swift 在派生数据文件夹中查找项目位置。
请帮助我解决这个问题。