xcode - xcode 6.1 中的 UIColor(调用中的额外参数)

标签 xcode swift updates uicolor

我最近将 xcode 从 6.0 更新到 6.1,更新后我收到关于 UIColor 的错误。错误说

调用中的额外参数“blue”。 xcode 6.0 不存在这个问题。

这是我的代码:

let texture = SKTexture(image: UIImage(named: car.carType.spriteName).makeGlowWithColor(UIColor(red: 1, blue: 0, green: 1, alpha: 1)))

我试过将它们转换为 CGFloat 等,但没有成功...

最佳答案

通过添加 ! 显式解包可选值

UIColor(red: 1, blue: 0, green: 1, alpha: 1)!

关于xcode - xcode 6.1 中的 UIColor(调用中的额外参数),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26603977/

相关文章:

ruby 与 Xcode 5

swift - 是否可以在 Swift 中为结构或类中的成员使用可选值?

ios - 我怎样才能获得卡路里?

grails - Grails:旧版数据库-带有复合ID的记录不会更新

ios - XCode 4.3, "Cannot define category for undefined class"使用多个 header

iphone - 创建 Facebook 应用程序时遇到的问题

ios - SWRevealViewController 和其他 View Controller

swift - 将 modulemap 用于 Swift 框架时 OpenSSL 库的非模块化 header

windows-10 - 防止 Windows 10 更新丢失我的休眠 session ?

notifications - 将数据从 android 服务传递到基于 Xamarin Form 的应用程序中的 ContentPage