iOS   发布时间:2022-03-30  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了ios – 错误 – 命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失败,退出代码为1大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_607_0@
@H_607_0@
我正在使用自定义键盘,如果我在我的课程中包含此代码,我收到错误

let isPad = UIDevice.currentDevice().userInterfaceI@L_832_4@m == UIUserInterfaceI@L_832_4@m.Pad

Error - Command/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc Failed with exit code 1

我需要这个代码,因为当用户在iPad上运行iPhone应用程序(如Instagram)时,我需要加载iPhone键盘预设并使用其几何体.我尝试下面的代码,但它不是一个解决方案:

如果UI_user_iNTERFACE_I@L_832_4@m()== .Pad
  {

}

如果有人有任何解决方案,请分享.

ios – 错误 – 命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失败,退出代码为1

解决方法

试试这个:

if UIDevice.currentDevice().userInterfaceI@L_832_4@m == .Pad {

    // iPad stuff
}

else if UIDevice.currentDevice().userInterfaceI@L_832_4@m == .Phone {

    // iPhone stuff
}

编辑

斯威夫特3

if UIDevice.current.userInterfaceI@L_832_4@m == .pad {

    // iPad stuff
}

else if UIDevice.current.userInterfaceI@L_832_4@m == .phone {

    // iPhone stuff
}
@H_607_0@

大佬总结

以上是大佬教程为你收集整理的ios – 错误 – 命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失败,退出代码为1全部内容,希望文章能够帮你解决ios – 错误 – 命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失败,退出代码为1所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:1appapplicationsbincontentsdeveloperiosswiftctoolchainsusrxcodexcode.appxcodedefaultxctoolchain代码命令失败退出错误
猜你在找的iOS相关文章
其他相关热搜词更多
phpJavaPython程序员load如何string使用参数jquery开发安装listlinuxiosandroid工具javascriptcap