Xcode 8.2, Swift 3.0
Legacy Constructor Violation: Swift constructors are preferred over legacy convenience functions. (legacy_constructor)
// ×
flowLayout.sectionInset = UIEdgeInsetsMake(0, 8, 8, 8)
// ◯
flowLayout.sectionInset = UIEdgeInsets(top: 0.0, left: 8.0, bottom: 8.0, right: 8.0)
別のインスタンス化方法があるのにレガシーな方法を使っている
Implicit Getter Violation: Computed read-only properties should avoid using the get keyword. (implicit_getter)
// ×
var hoge: String {
get {
return "fuga"
}
}
// ◯
var hoge: String {
return "fuga"
}
参考 http://stackoverflow.com/questions/40327125/in-swift-3-uiedgeinsetsmake-is-available