Package apple.uikit

Class UISearchBar

    • Constructor Detail

      • UISearchBar

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static UISearchBar allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • appearance

        @NotNull
        public static @NotNull UISearchBar appearance()
      • appearanceForTraitCollection

        @NotNull
        public static @NotNull UISearchBar appearanceForTraitCollection​(@NotNull
                                                                        @NotNull UITraitCollection trait)
      • appearanceForTraitCollectionWhenContainedIn

        @NotNull
        @Deprecated
        public static @NotNull UISearchBar appearanceForTraitCollectionWhenContainedIn​(@NotNull
                                                                                       @NotNull UITraitCollection trait,
                                                                                       @Nullable
                                                                                       @Nullable UIAppearanceContainer ContainerClass,
                                                                                       java.lang.Object... varargs)
        Deprecated.
      • appearanceForTraitCollectionWhenContainedInInstancesOfClasses

        @NotNull
        public static @NotNull UISearchBar appearanceForTraitCollectionWhenContainedInInstancesOfClasses​(@NotNull
                                                                                                         @NotNull UITraitCollection trait,
                                                                                                         @NotNull
                                                                                                         @NotNull NSArray<?> containerTypes)
      • appearanceWhenContainedIn

        @NotNull
        @Deprecated
        public static @NotNull UISearchBar appearanceWhenContainedIn​(@Nullable
                                                                     @Nullable UIAppearanceContainer ContainerClass,
                                                                     java.lang.Object... varargs)
        Deprecated.
      • appearanceWhenContainedInInstancesOfClasses

        @NotNull
        public static @NotNull UISearchBar appearanceWhenContainedInInstancesOfClasses​(@NotNull
                                                                                       @NotNull NSArray<?> containerTypes)
      • areAnimationsEnabled

        public static boolean areAnimationsEnabled()
      • automaticallyNotifiesObserversForKey

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

        @Deprecated
        public static void beginAnimationsContext​(@Nullable
                                                  @Nullable java.lang.String animationID,
                                                  @Nullable
                                                  @Nullable org.moe.natj.general.ptr.VoidPtr context)
        Deprecated.
      • 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()
      • clearTextInputContextIdentifier

        public static void clearTextInputContextIdentifier​(@NotNull
                                                           @NotNull java.lang.String identifier)
      • commitAnimations

        @Deprecated
        public static void commitAnimations()
        Deprecated.
      • 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()
      • inheritedAnimationDuration

        public static double inheritedAnimationDuration()
      • instanceMethodSignatureForSelector

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

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • 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)
      • layerClass

        @NotNull
        public static @NotNull org.moe.natj.objc.Class layerClass()
      • requiresConstraintBasedLayout

        public static boolean requiresConstraintBasedLayout()
      • resolveClassMethod

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

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

        @Deprecated
        public static void setAnimationBeginsFromCurrentState​(boolean fromCurrentState)
        Deprecated.
      • setAnimationCurve

        @Deprecated
        public static void setAnimationCurve​(long curve)
        Deprecated.
      • setAnimationDelay

        @Deprecated
        public static void setAnimationDelay​(double delay)
        Deprecated.
      • setAnimationDelegate

        @Deprecated
        public static void setAnimationDelegate​(@Nullable
                                                @Nullable java.lang.Object delegate)
        Deprecated.
      • setAnimationDidStopSelector

        @Deprecated
        public static void setAnimationDidStopSelector​(@Nullable
                                                       @Nullable org.moe.natj.objc.SEL selector)
        Deprecated.
      • setAnimationDuration_static

        @Deprecated
        public static void setAnimationDuration_static​(double duration)
        Deprecated.
      • setAnimationRepeatAutoreverses

        @Deprecated
        public static void setAnimationRepeatAutoreverses​(boolean repeatAutoreverses)
        Deprecated.
      • setAnimationRepeatCount_static

        @Deprecated
        public static void setAnimationRepeatCount_static​(float repeatCount)
        Deprecated.
      • setAnimationStartDate

        @Deprecated
        public static void setAnimationStartDate​(@NotNull
                                                 @NotNull NSDate startDate)
        Deprecated.
      • setAnimationTransitionForViewCache

        @Deprecated
        public static void setAnimationTransitionForViewCache​(long transition,
                                                              @NotNull
                                                              @NotNull UIView view,
                                                              boolean cache)
        Deprecated.
      • setAnimationWillStartSelector

        @Deprecated
        public static void setAnimationWillStartSelector​(@Nullable
                                                         @Nullable org.moe.natj.objc.SEL selector)
        Deprecated.
      • setAnimationsEnabled

        public static void setAnimationsEnabled​(boolean enabled)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

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

        public static long userInterfaceLayoutDirectionForSemanticContentAttribute​(long attribute)
      • userInterfaceLayoutDirectionForSemanticContentAttributeRelativeToLayoutDirection

        public static long userInterfaceLayoutDirectionForSemanticContentAttributeRelativeToLayoutDirection​(long semanticContentAttribute,
                                                                                                            long layoutDirection)
      • version_static

        public static long version_static()
      • _appearance

        @NotNull
        public @NotNull UISearchBar _appearance()
        Description copied from interface: UIAppearance
        To customize the appearance of all instances of a class, send the relevant appearance modification messages to the appearance proxy for the class. For example, to modify the bar tint color for all UINavigationBar instances: [[UINavigationBar appearance] setBarTintColor:myColor]; Note for iOS7: On iOS7 the tintColor property has moved to UIView, and now has special inherited behavior described in UIView.h. This inherited behavior can conflict with the appearance proxy, and therefore tintColor is now disallowed with the appearance proxy.
        Specified by:
        _appearance in interface UIAppearance
        Overrides:
        _appearance in class UIView
      • _appearanceWhenContainedIn

        @NotNull
        @Deprecated
        public @NotNull UISearchBar _appearanceWhenContainedIn​(@Nullable
                                                               @Nullable UIAppearanceContainer ContainerClass,
                                                               java.lang.Object... varargs)
        Deprecated.
        Description copied from interface: UIAppearance
        To customize the appearances for instances of a class contained within an instance of a container class, or instances in a hierarchy, use +appearanceWhenContainedInInstancesOfClasses: for the appropriate appearance proxy. For example: [[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[UISplitViewController class]]] setBarTintColor:myColor]; [[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[UITabBarController class], [UISplitViewController class]]] setBarTintColor:myTabbedNavBarColor]; In any given view hierarchy the outermost appearance proxy wins. Specificity (depth of the chain) is the tie-breaker. In other words, the containment statement is treated as a partial ordering. Given a concrete ordering (actual subview hierarchy), we select the partial ordering that is the first unique match when reading the actual hierarchy from the window down. API-Since: 5.0 Deprecated-Since: 9.0
        Specified by:
        _appearanceWhenContainedIn in interface UIAppearance
        Overrides:
        _appearanceWhenContainedIn in class UIView
      • backgroundImage

        @Nullable
        public @Nullable UIImage backgroundImage()
        1pt wide images and resizable images will be scaled or tiled according to the resizable area, otherwise the image will be tiled API-Since: 5.0
      • backgroundImageForBarPositionBarMetrics

        @Nullable
        public @Nullable UIImage backgroundImageForBarPositionBarMetrics​(long barPosition,
                                                                         long barMetrics)
        API-Since: 7.0
      • barStyle

        public long barStyle()
        default is UIBarStyleDefault (blue)
      • barTintColor

        @Nullable
        public @Nullable UIColor barTintColor()
        default is nil API-Since: 7.0
      • delegate

        @Nullable
        public @Nullable UISearchBarDelegate delegate()
        weak reference. default is nil
      • enablesReturnKeyAutomatically

        public boolean enablesReturnKeyAutomatically()
        Description copied from interface: UITextInputTraits
        default is NO (when YES, will automatically disable return key when text widget has zero-length contents, and will automatically enable when text widget has non-zero-length contents)
        Specified by:
        enablesReturnKeyAutomatically in interface UITextInputTraits
      • imageForSearchBarIconState

        @Nullable
        public @Nullable UIImage imageForSearchBarIconState​(long icon,
                                                            long state)
        API-Since: 5.0
      • inputAccessoryView

        @Nullable
        public @Nullable UIView inputAccessoryView()
        Allow placement of an input accessory view to the keyboard for the search bar
        Overrides:
        inputAccessoryView in class UIResponder
      • inputAssistantItem

        @NotNull
        public @NotNull UITextInputAssistantItem inputAssistantItem()
        Use this method to modify the contents of the Unified Content Bar, shown on top of the keyboard when search is engaged. You may modify the returned inputAssistantItem to add to or replace the existing items on the bar. Modifications made to the returned UITextInputAssistantItem are reflected automatically. API-Since: 9.0
        Overrides:
        inputAssistantItem in class UIResponder
      • isSearchResultsButtonSelected

        public boolean isSearchResultsButtonSelected()
        default is NO API-Since: 3.2
      • setSearchResultsButtonSelected

        public void setSearchResultsButtonSelected​(boolean value)
        default is NO API-Since: 3.2
      • isTranslucent

        public boolean isTranslucent()
        Default is NO on iOS 6 and earlier. Always YES if barStyle is set to UIBarStyleBlackTranslucent API-Since: 3.0
      • setTranslucent

        public void setTranslucent​(boolean value)
        Default is NO on iOS 6 and earlier. Always YES if barStyle is set to UIBarStyleBlackTranslucent API-Since: 3.0
      • placeholder

        @Nullable
        public @Nullable java.lang.String placeholder()
        default is nil
      • positionAdjustmentForSearchBarIcon

        public UIOffset positionAdjustmentForSearchBarIcon​(long icon)
        API-Since: 5.0
      • prompt

        @Nullable
        public @Nullable java.lang.String prompt()
        default is nil
      • scopeBarBackgroundImage

        @Nullable
        public @Nullable UIImage scopeBarBackgroundImage()
        API-Since: 5.0
      • scopeBarButtonBackgroundImageForState

        @Nullable
        public @Nullable UIImage scopeBarButtonBackgroundImageForState​(long state)
        API-Since: 5.0
      • scopeBarButtonDividerImageForLeftSegmentStateRightSegmentState

        @Nullable
        public @Nullable UIImage scopeBarButtonDividerImageForLeftSegmentStateRightSegmentState​(long leftState,
                                                                                                long rightState)
        API-Since: 5.0
      • scopeBarButtonTitleTextAttributesForState

        @Nullable
        public @Nullable NSDictionary<java.lang.String,​?> scopeBarButtonTitleTextAttributesForState​(long state)
        API-Since: 5.0
      • scopeButtonTitles

        @Nullable
        public @Nullable NSArray<java.lang.String> scopeButtonTitles()
        array of NSStrings. no scope bar shown unless 2 or more items API-Since: 3.0
      • searchBarStyle

        public long searchBarStyle()
        API-Since: 7.0
      • searchFieldBackgroundImageForState

        @Nullable
        public @Nullable UIImage searchFieldBackgroundImageForState​(long state)
        API-Since: 5.0
      • searchFieldBackgroundPositionAdjustment

        public UIOffset searchFieldBackgroundPositionAdjustment()
        To nudge the position of the search text field background in the search bar API-Since: 5.0
      • searchTextPositionAdjustment

        public UIOffset searchTextPositionAdjustment()
        To nudge the position of the text within the search text field background API-Since: 5.0
      • selectedScopeButtonIndex

        public long selectedScopeButtonIndex()
        index into array of scope button titles. default is 0. ignored if out of range API-Since: 3.0
      • setBackgroundImage

        public void setBackgroundImage​(@Nullable
                                       @Nullable UIImage value)
        1pt wide images and resizable images will be scaled or tiled according to the resizable area, otherwise the image will be tiled API-Since: 5.0
      • setBackgroundImageForBarPositionBarMetrics

        public void setBackgroundImageForBarPositionBarMetrics​(@Nullable
                                                               @Nullable UIImage backgroundImage,
                                                               long barPosition,
                                                               long barMetrics)
        Use UIBarMetricsDefaultPrompt to set a separate backgroundImage for a search bar with a prompt API-Since: 7.0
      • setBarStyle

        public void setBarStyle​(long value)
        default is UIBarStyleDefault (blue)
      • setBarTintColor

        public void setBarTintColor​(@Nullable
                                    @Nullable UIColor value)
        default is nil API-Since: 7.0
      • setDelegate_unsafe

        public void setDelegate_unsafe​(@Nullable
                                       @Nullable UISearchBarDelegate value)
        weak reference. default is nil
      • setDelegate

        public void setDelegate​(@Nullable
                                @Nullable UISearchBarDelegate value)
        weak reference. default is nil
      • setEnablesReturnKeyAutomatically

        public void setEnablesReturnKeyAutomatically​(boolean value)
        Description copied from interface: UITextInputTraits
        default is NO (when YES, will automatically disable return key when text widget has zero-length contents, and will automatically enable when text widget has non-zero-length contents)
        Specified by:
        setEnablesReturnKeyAutomatically in interface UITextInputTraits
      • setImageForSearchBarIconState

        public void setImageForSearchBarIconState​(@Nullable
                                                  @Nullable UIImage iconImage,
                                                  long icon,
                                                  long state)
        API-Since: 5.0
      • setInputAccessoryView

        public void setInputAccessoryView​(@Nullable
                                          @Nullable UIView value)
        Allow placement of an input accessory view to the keyboard for the search bar
      • setPlaceholder

        public void setPlaceholder​(@Nullable
                                   @Nullable java.lang.String value)
        default is nil
      • setPositionAdjustmentForSearchBarIcon

        public void setPositionAdjustmentForSearchBarIcon​(UIOffset adjustment,
                                                          long icon)
        To nudge the position of the icon within the search text field API-Since: 5.0
      • setPrompt

        public void setPrompt​(@Nullable
                              @Nullable java.lang.String value)
        default is nil
      • setReturnKeyType

        public void setReturnKeyType​(long value)
        Description copied from interface: UITextInputTraits
        default is UIReturnKeyDefault (See note under UIReturnKeyType enum)
        Specified by:
        setReturnKeyType in interface UITextInputTraits
      • setScopeBarBackgroundImage

        public void setScopeBarBackgroundImage​(@Nullable
                                               @Nullable UIImage value)
        API-Since: 5.0
      • setScopeBarButtonBackgroundImageForState

        public void setScopeBarButtonBackgroundImageForState​(@Nullable
                                                             @Nullable UIImage backgroundImage,
                                                             long state)
        If backgroundImage is an image returned from -[UIImage resizableImageWithCapInsets:] the cap widths will be calculated from the edge insets, otherwise, the cap width will be calculated by subtracting one from the image's width then dividing by 2. The cap widths will also be used as the margins for text placement. To adjust the margin use the margin adjustment methods. API-Since: 5.0
      • setScopeBarButtonDividerImageForLeftSegmentStateRightSegmentState

        public void setScopeBarButtonDividerImageForLeftSegmentStateRightSegmentState​(@Nullable
                                                                                      @Nullable UIImage dividerImage,
                                                                                      long leftState,
                                                                                      long rightState)
        To customize the segmented control appearance you will need to provide divider images to go between two unselected segments (leftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateNormal), selected on the left and unselected on the right (leftSegmentState:UIControlStateSelected rightSegmentState:UIControlStateNormal), and unselected on the left and selected on the right (leftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateSelected). API-Since: 5.0
      • setScopeBarButtonTitleTextAttributesForState

        public void setScopeBarButtonTitleTextAttributesForState​(@Nullable
                                                                 @Nullable NSDictionary<java.lang.String,​?> attributes,
                                                                 long state)
        You may specify the font, text color, and shadow properties for the title in the text attributes dictionary, using the keys found in NSAttributedString.h. API-Since: 5.0
      • setScopeButtonTitles

        public void setScopeButtonTitles​(@Nullable
                                         @Nullable NSArray<java.lang.String> value)
        array of NSStrings. no scope bar shown unless 2 or more items API-Since: 3.0
      • setSearchBarStyle

        public void setSearchBarStyle​(long value)
        API-Since: 7.0
      • setSearchFieldBackgroundImageForState

        public void setSearchFieldBackgroundImageForState​(@Nullable
                                                          @Nullable UIImage backgroundImage,
                                                          long state)
        The rounded-rect search text field image. Valid states are UIControlStateNormal and UIControlStateDisabled API-Since: 5.0
      • setSearchFieldBackgroundPositionAdjustment

        public void setSearchFieldBackgroundPositionAdjustment​(UIOffset value)
        To nudge the position of the search text field background in the search bar API-Since: 5.0
      • setSearchTextPositionAdjustment

        public void setSearchTextPositionAdjustment​(UIOffset value)
        To nudge the position of the text within the search text field background API-Since: 5.0
      • setSelectedScopeButtonIndex

        public void setSelectedScopeButtonIndex​(long value)
        index into array of scope button titles. default is 0. ignored if out of range API-Since: 3.0
      • setShowsBookmarkButton

        public void setShowsBookmarkButton​(boolean value)
        default is NO
      • setShowsCancelButton

        public void setShowsCancelButton​(boolean value)
        default is NO
      • setShowsCancelButtonAnimated

        public void setShowsCancelButtonAnimated​(boolean showsCancelButton,
                                                 boolean animated)
        API-Since: 3.0
      • setShowsScopeBar

        public void setShowsScopeBar​(boolean value)
        default is NO. if YES, shows the scope bar. call sizeToFit: to update frame API-Since: 3.0
      • setShowsSearchResultsButton

        public void setShowsSearchResultsButton​(boolean value)
        default is NO API-Since: 3.2
      • setText

        public void setText​(@Nullable
                            @Nullable java.lang.String value)
        current/starting search text
      • setTintColor

        public void setTintColor​(UIColor value)
        The behavior of tintColor for bars has changed on iOS 7.0. It no longer affects the bar's background and behaves as described for the tintColor property added to UIView. To tint the bar's background, please use -barTintColor.
        Overrides:
        setTintColor in class UIView
      • showsBookmarkButton

        public boolean showsBookmarkButton()
        default is NO
      • showsCancelButton

        public boolean showsCancelButton()
        default is NO
      • showsScopeBar

        public boolean showsScopeBar()
        default is NO. if YES, shows the scope bar. call sizeToFit: to update frame API-Since: 3.0
      • showsSearchResultsButton

        public boolean showsSearchResultsButton()
        default is NO API-Since: 3.2
      • text

        @Nullable
        public @Nullable java.lang.String text()
        current/starting search text
      • tintColor

        public UIColor tintColor()
        The behavior of tintColor for bars has changed on iOS 7.0. It no longer affects the bar's background and behaves as described for the tintColor property added to UIView. To tint the bar's background, please use -barTintColor.
        Overrides:
        tintColor in class UIView
      • searchTextField

        @NotNull
        public @NotNull UISearchTextField searchTextField()
        API-Since: 13.0
      • setShowsScopeBarAnimated

        public void setShowsScopeBarAnimated​(boolean show,
                                             boolean animate)
        API-Since: 13.0
      • isEnabled

        public boolean isEnabled()
        Default YES API-Since: 16.4
      • setEnabled

        public void setEnabled​(boolean value)
        Default YES API-Since: 16.4
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.