Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Add the SelectableNavigator protocol #188

Merged
merged 3 commits into from
Jul 21, 2021
Merged

Conversation

mickael-menu
Copy link
Member

Added

  • New SelectableNavigator protocol for navigators supporting user selection.
    • Get or clear the current selection.
    • Implement navigator(_:canPerformAction:for:) to validate each editing action for the current selection. For example, to make sure the selected text is not too large for a definition look up.
    • Implement navigator(_:shouldShowMenuForSelection:) to override the default edit menu (UIMenuController) with a custom selection pop-up.

Note: This is not yet implemented by any navigator. The EPUB navigator requires code that is coming in the Decorator PR (#186).

@mickael-menu mickael-menu merged commit 914192a into develop Jul 21, 2021
@mickael-menu mickael-menu deleted the feature/selectable branch July 21, 2021 17:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant