valid_ibinspectable - ApplebaumIan/BitbucketAPI GitHub Wiki
@IBInspectable should be applied to variables only, have its type explicit and be of a supported type
- Identifier: valid_ibinspectable
- Enabled by default: Enabled
- Supports autocorrection: No
- Kind: lint
- Analyzer rule: No
- Minimum Swift compiler version: 3.0.0
- Default configuration: warning
class Foo {
@IBInspectable private var x: Int
}class Foo {
@IBInspectable private var x: String?
}class Foo {
@IBInspectable private var x: String!
}class Foo {
@IBInspectable private var count: Int = 0
}class Foo {
private var notInspectable = 0
}class Foo {
private let notInspectable: Int
}class Foo {
private let notInspectable: UInt8
}extension Foo {
@IBInspectable var color: UIColor {
set {
self.bar.textColor = newValue
}
get {
return self.bar.textColor
}
}
}class Foo {
@IBInspectable private ↓let count: Int
}class Foo {
@IBInspectable private ↓var insets: UIEdgeInsets
}class Foo {
@IBInspectable private ↓var count = 0
}class Foo {
@IBInspectable private ↓var count: Int?
}class Foo {
@IBInspectable private ↓var count: Int!
}class Foo {
@IBInspectable private ↓var x: ImplicitlyUnwrappedOptional<Int>
}class Foo {
@IBInspectable private ↓var count: Optional<Int>
}class Foo {
@IBInspectable private ↓var x: Optional<String>
}class Foo {
@IBInspectable private ↓var x: ImplicitlyUnwrappedOptional<String>
}