小编use*_*897的帖子

如何在xcode ui test中使用swift代码旋转模拟器

我有一个场景,我必须旋转我的模拟器,而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 ios xctest swift xcode-ui-testing

12
推荐指数
1
解决办法
1767
查看次数

在 xcode 8 的派生数据文件夹中找到项目路径

我已经搜索了很多,但找不到有用的链接来使用 xcode 8 中的 swift 在派生数据文件夹中查找项目位置。

请帮助我解决这个问题。

xcode swift xcode8

3
推荐指数
1
解决办法
1051
查看次数

标签 统计

swift ×2

xcode ×2

ios ×1

xcode-ui-testing ×1

xcode8 ×1

xctest ×1