Pointer effects
This commit is contained in:
@@ -14,6 +14,11 @@ class SegmentedReliefButton: ReliefButton
|
||||
didSet { children.forEach { addSubview($0) }; setNeedsLayout() }
|
||||
}
|
||||
|
||||
override var isPointerInteractionEnabled: Bool {
|
||||
set { children.forEach { $0.isPointerInteractionEnabled = newValue } }
|
||||
get { children.first?.isPointerInteractionEnabled ?? false }
|
||||
}
|
||||
|
||||
private let backgroundsContainerView = UIView(frame: .zero)
|
||||
private var childrenHighlighObservations: [NSKeyValueObservation] = []
|
||||
|
||||
@@ -30,7 +35,8 @@ class SegmentedReliefButton: ReliefButton
|
||||
}
|
||||
|
||||
override var isHighlighted: Bool {
|
||||
didSet {}
|
||||
// Does not highlight. Only children do.
|
||||
set {} get { false }
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
|
||||
Reference in New Issue
Block a user