0

Currently, I have a note taking app with global text search feature. It is using standard UISearchController and able to provide the following UI outcome.

enter image description here

However, I would also like to provide a in-note text search feature. It should look very similar to "Find in Note" feature in Apple Notes.

enter image description here

Such the UI, is also found in Safari web browser.

enter image description here

I am not sure, is such an UI (With "Done", "Text field", "? of ? label", "x button", "next button", "prev button"), is it is standard UIKit component, or just a custom view?

Thanks.

1 Answer 1

2

You're looking for UIFindInteraction, and the related class UIFindSession and protocol UITextSearching. These APIs were added in iOS 16 (released late 2022).

The second half of WWDC 2022: Adopt desktop-class editing interactions explains how to use these APIs.

Sign up to request clarification or add additional context in comments.

2 Comments

Useful info! Thanks. But, do you have idea how can we provide such a feature in iOS 15? I tested with Safari in iOS 15, it does have similar feature. (Not exact same UI, as when you are typing in Safari iOS 15 search next bar, it doesn't have the x button)
Apple often implements features privately and then later makes them available in the public SDK. It sounds like this is one of those features. If you want to support iOS 15, you'll have to implement it entirely yourself.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.