valid_ibinspectable requires explicit types.
Swiftlint fires warning here:
@IBInspectable public var isSimulatingBarButtonItem = false
$ swiftlint lint
warning: Valid IBInspectable Violation: @IBInspectable should be applied to variables only, have its type explicit and be of a supported type (valid_ibinspectable)
swiftlint version to be sure)?Installation method used (Homebrew, CocoaPods, building from source, etc)?
Via package file from releases assets
Are you using nested configurations? no
xcode-select -p)? Version 10.2.1 (10E1001)// This triggers a violation:
import UIKit
public final class CloseButton: UIButton {
@IBInspectable public var isSimulatingBarButtonItem = false
}
Interface Builder requires to add type explicitly in other case this property is not displayed as custom attribute.
Adding public like @IBInspectable public var cornerRadius: CGFloat or public extension UIView { solved warning for me
Most helpful comment
Adding
publiclike@IBInspectable public var cornerRadius: CGFloatorpublic extension UIView {solved warning for me