AutocompleteManagerDelegate

public protocol AutocompleteManagerDelegate : AnyObject

AutocompleteManagerDelegate is a protocol that more precisely define AutocompleteManager logic

  • Can be used to determine if the AutocompleteManager should be inserted into an InputStackView

    Declaration

    Swift

    func autocompleteManager(_ manager: AutocompleteManager, shouldBecomeVisible: Bool)

    Parameters

    manager

    The AutocompleteManager

    shouldBecomeVisible

    If the AutocompleteManager should be presented or dismissed

  • Determines if a prefix character should be registered to initialize the auto-complete selection table

    Default Implementation

    Declaration

    Swift

    func autocompleteManager(_ manager: AutocompleteManager, shouldRegister prefix: String, at range: NSRange) -> Bool

    Parameters

    manager

    The AutocompleteManager

    prefix

    The prefix Character could be registered

    range

    The NSRange of the prefix in the UITextView managed by the AutocompleteManager

    Return Value

    If the prefix should be registered. Default is TRUE

  • Determines if a prefix character should be unregistered to de-initialize the auto-complete selection table

    Default Implementation

    Declaration

    Swift

    func autocompleteManager(_ manager: AutocompleteManager, shouldUnregister prefix: String) -> Bool

    Parameters

    manager

    The AutocompleteManager

    prefix

    The prefix character could be unregistered

    range

    The range of the prefix in the UITextView managed by the AutocompleteManager

    Return Value

    If the prefix should be unregistered. Default is TRUE

  • Determines if a prefix character can should be autocompleted

    Default Implementation

    Declaration

    Swift

    func autocompleteManager(_ manager: AutocompleteManager, shouldComplete prefix: String, with text: String) -> Bool

    Parameters

    manager

    The AutocompleteManager

    prefix

    The prefix character that is currently registered

    text

    The text to autocomplete with

    Return Value

    If the prefix can be autocompleted. Default is TRUE