pilot icon indicating copy to clipboard operation
pilot copied to clipboard

Change `selected` on `View` to `selectionStyle`

Open wkiefer opened this issue 8 years ago • 0 comments

selected has issues when you subclass an Objective-C NSView or UIView with an isSelected getter (example is NSTableRowView) and also conform it to View.

The synthesized swift name (isSelected) cannot coexist with the View conformance selected.

This seemed to work ok in Swift <3.2, but no longer works in Swift 3.2+.

We should move this to an emum of selectionStyle to match highlightStyle. This will also give us a bit more flexibility in types of selection state.

We should also give NSView and UIView classes that have a selected property easy free implementations of selectionState.

This is a breaking change.

wkiefer avatar Jun 08 '17 06:06 wkiefer