SO answer 48935567 vs 62549061 (original whitespace)

19 lines
-20 Removals
14 lines
+8 Additions
import Cocoa
@IBDesignable
@objc(BCLDisablableScrollView)
public class DisablableScrollView: NSScrollView {
public class DisablableScrollView: NSScrollView {
@IBInspectable
@IBInspectable
@objc(enabled)
public var isEnabled: Bool = true
public var isEnabled: Bool = true
public override func scrollWheel(with event: NSEvent) {
if isEnabled {
public override func scrollWheel(with event: NSEvent) {
super.scrollWheel(with: event)
if isEnabled {
}
super.scrollWheel(with: event)
else {
}
nextResponder?.scrollWheel(with: event)
else {
nextResponder?.scrollWheel(with: event)
}
}
}
}
}
}
Editor
Clear
Export as PDF