ably / ably-asset-tracking-swift

iOS client SDKs for the Ably Asset Tracking service.
Apache License 2.0
9 stars 6 forks source link

Add a textSelection functionality for the upload files' names in the Publisher example app #507

Closed JakubJankowski closed 1 year ago

JakubJankowski commented 1 year ago

Resolves #482

Found an easier way to do it, using the textSelection on a Text object. Works only on iOS >= 15, but I think it should be good enough for our needs.

Related Apple's api docstring:

    /// On iOS, the person using the app touches and holds on a selectable
    /// `Text` view, which brings up a system menu with menu items appropriate
    /// for the current context. These menu items operate on the entire contents
    /// of the `Text` view; the person can't select a range of text like they
    /// can on macOS.
Copy Text Demo Screenshot