Skip to content

iOS Highlights / notes in the text #17

Answered by mickael-menu
openm1nd asked this question in Q&A
Discussion options

You must be logged in to vote

(Right now, the following is only implemented on the EPUB navigator)

1. Add a "Highlight" selection menu item

You can add custom "editing actions" for the selection menu when initializing a navigator, if it supports it. For example, with EPUB:

init() {
    var config = EPUBNavigatorViewController.Configuration()
    config.editingActions.append(
        EditingAction(title: "Highlight", action: #selector(makeHighlight))
    )
    if publication.isProtected {
        config.editingActions = [.lookup, .translate]
    }
    
    let navigator = EPUBNavigatorViewController(publication: publication, initialLocation: location, resourcesServer: app.server, config: config)
}

@objc func makeHighl…

Replies: 5 comments 20 replies

Comment options

You must be logged in to vote
7 replies
@rohitvishwakarma-sf
Comment options

@mickael-menu
Comment options

@rohitvishwakarma-sf
Comment options

@rohitvishwakarma-sf
Comment options

@mickael-menu
Comment options

Answer selected by openm1nd
Comment options

You must be logged in to vote
2 replies
@mickael-menu
Comment options

@Amit2192
Comment options

Comment options

You must be logged in to vote
8 replies
@AmitSP91
Comment options

@gatamar
Comment options

@AmitSP91
Comment options

@mickael-menu
Comment options

@mickael-menu
Comment options

Comment options

You must be logged in to vote
1 reply
@mickael-menu
Comment options

Comment options

You must be logged in to vote
2 replies
@mickael-menu
Comment options

@rohitvishwakarma-sf
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
9 participants