Package apple.uikit

Class UIFindSession

  • All Implemented Interfaces:
    NSObject
    Direct Known Subclasses:
    UITextSearchingFindSession

    public class UIFindSession
    extends NSObject
    UIFindSession An abstract base class for managing a find session. A UIFindSession instance is returned by UIFindInteractionDelegate when a find session is initiated by the user. You can choose to implement a subclass of UIFindSession to handle all state, decoration, and behavior yourself. This would be the preferred choice if the view your find interaction is attached to is very custom in the way it handles the presentation of found results. Other clients are encouraged to instead use UISearchableObjectFindSession and the UITextSearching protocol, which manages the state of a find session automatically using behavior consistent with the rest of the system. API-Since: 16.0
    • Constructor Detail

      • UIFindSession

        protected UIFindSession​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static UIFindSession allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • allowsReplacement

        @Deprecated
        public boolean allowsReplacement()
        Deprecated.
        API-Since: 16.0 Deprecated-Since: 16.0
      • allowsReplacementForCurrentlyHighlightedResult

        public boolean allowsReplacementForCurrentlyHighlightedResult()
        Return YES if replacement is allowed for the currently highlighted item. This property controls the enabled state of the "replace" button in the find navigator, as well as various hardware keyboard shortcuts involving replacement. Default is YES, if supportsReplacement is YES.
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • highlightNextResultInDirection

        public void highlightNextResultInDirection​(long direction)
        Called when either the next or previous button is activated, or when return or shift+return is pressed in the search field.
        Parameters:
        direction - Which direction the user intends to move, either forward or backward.
      • highlightedResultIndex

        public long highlightedResultIndex()
        Returns the index of the currently highlighted result, out of @c resultCount. If no result is currently highlighted, return NSNotFound. You may call UIFindInteraction's @c updateResultCount to update the system find panel's UI if already visible.
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • invalidateFoundResults

        public void invalidateFoundResults()
        This method will be called whenever the current find session's found/highlighted results are to be invalidated. For instance, when the search query is cleared, options changed, or any other event where we may not perform another search right away.
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • performSearchWithQueryOptions

        public void performSearchWithQueryOptions​(@NotNull
                                                  @NotNull java.lang.String query,
                                                  @Nullable
                                                  @Nullable UITextSearchOptions options)
        Called when the user requests a search to be performed for @c query, using @c options.
        Parameters:
        query - The search string entered into the search text field in the system find panel.
        options - Object representing all configured search options for this search.
      • performSingleReplacementWithSearchQueryReplacementStringOptions

        public void performSingleReplacementWithSearchQueryReplacementStringOptions​(@NotNull
                                                                                    @NotNull java.lang.String searchQuery,
                                                                                    @NotNull
                                                                                    @NotNull java.lang.String replacementString,
                                                                                    @Nullable
                                                                                    @Nullable UITextSearchOptions options)
        Called when the user requests a single replacement to occur given @c searchQuery and @c replacementString.
        Parameters:
        searchQuery - The search string entered into the search text field in the system find panel.
        replacementString - The replacement string entered into the replace text field in the system find panel.
        options - Object representing all configured search options for this replacement.
      • replaceAllInstancesOfSearchQueryWithReplacementStringOptions

        public void replaceAllInstancesOfSearchQueryWithReplacementStringOptions​(@NotNull
                                                                                 @NotNull java.lang.String searchQuery,
                                                                                 @NotNull
                                                                                 @NotNull java.lang.String replacementString,
                                                                                 @Nullable
                                                                                 @Nullable UITextSearchOptions options)
        Called when the user requests a document-wide replacement to occur.
        Parameters:
        searchQuery - The search string entered into the search text field in the system find panel.
        replacementString - The replacement string entered into the replace text field in the system find panel.
        options - Object representing all configured search options for this replacement.
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • resultCount

        public long resultCount()
        Returns the total number of results. You may call UIFindInteraction's @c updateResultCount to update the system find panel's UI if already visible.
      • searchResultDisplayStyle

        public long searchResultDisplayStyle()
        Defines how results are reported through the find panel's UI. The default style is @c CurrentAndTotal.
      • setSearchResultDisplayStyle

        public void setSearchResultDisplayStyle​(long value)
        Defines how results are reported through the find panel's UI. The default style is @c CurrentAndTotal.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsReplacement

        public boolean supportsReplacement()
        Return YES if replacement is supported. This gates the appearance of replace UI in the find navigator panel. Default is NO.
      • version_static

        public static long version_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.