Xcode 9项目不再使用Xcode 10.1进行编译,抱怨初始化程序。我该如何排除故障?

时间:2018-11-26 19:05:45

标签: swift xcode xcode10 xcode10.1

今天,我升级到Xcode10。今天早些时候使用Xcode 9.x编译的同一项目现在抱怨几乎所有的Xcode 10.1中的初始化程序。

我尝试清理项目并重建,没有运气。 我玩过编译器优化级别,没有运气。

示例代码: snippet_1

在新的Xcode 10项目中编译相同的代码就可以了。编译器错误的其他实例:

let b = UIButton() // throws "Cannot invoke initializer for type 'UIButton' with no arguments"
//1. Overloads for 'UIButton' exist with these partially matching parameter lists: (type: UIButtonType), (frame: CGRect), (coder: NSCoder), (with: UIColor), (with: ThemeColorPicker)

let l = UILabel() // throws "Cannot invoke initializer for type 'UILabel' with no arguments"

var safeAreaLayoutGuideBottom = UIView()// throws "Cannot invoke initializer for type 'UIView' with no arguments"

0 个答案:

没有答案