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 java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • appearance

        public static java.lang.Object appearance()
      • appearanceForTraitCollection

        public static java.lang.Object appearanceForTraitCollection​(UITraitCollection trait)
      • appearanceForTraitCollectionWhenContainedIn

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

        public static java.lang.Object appearanceForTraitCollectionWhenContainedInInstancesOfClasses​(UITraitCollection trait,
                                                                                                     NSArray<?> containerTypes)
      • appearanceWhenContainedIn

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

        public static java.lang.Object appearanceWhenContainedInInstancesOfClasses​(NSArray<?> containerTypes)
      • areAnimationsEnabled

        public static boolean areAnimationsEnabled()
      • automaticallyNotifiesObserversForKey

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

        public static void beginAnimationsContext​(java.lang.String animationID,
                                                  org.moe.natj.general.ptr.VoidPtr context)
      • cancelPreviousPerformRequestsWithTarget

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

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

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

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • clearTextInputContextIdentifier

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

        public static void commitAnimations()
      • 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

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • layerClass

        public static org.moe.natj.objc.Class layerClass()
      • new_objc

        public static java.lang.Object new_objc()
      • 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

        public static void setAnimationBeginsFromCurrentState​(boolean fromCurrentState)
      • setAnimationCurve

        public static void setAnimationCurve​(long curve)
      • setAnimationDelay

        public static void setAnimationDelay​(double delay)
      • setAnimationDelegate

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

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

        public static void setAnimationDuration_static​(double duration)
      • setAnimationRepeatAutoreverses

        public static void setAnimationRepeatAutoreverses​(boolean repeatAutoreverses)
      • setAnimationRepeatCount_static

        public static void setAnimationRepeatCount_static​(float repeatCount)
      • setAnimationStartDate

        public static void setAnimationStartDate​(NSDate startDate)
      • setAnimationTransitionForViewCache

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

        public static void setAnimationWillStartSelector​(org.moe.natj.objc.SEL selector)
      • 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

        public java.lang.Object _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

        @Deprecated
        public java.lang.Object _appearanceWhenContainedIn​(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.
        Specified by:
        _appearanceWhenContainedIn in interface UIAppearance
        Overrides:
        _appearanceWhenContainedIn in class UIView
      • backgroundImage

        public UIImage backgroundImage()
        1pt wide images and resizable images will be scaled or tiled according to the resizable area, otherwise the image will be tiled
      • backgroundImageForBarPositionBarMetrics

        public UIImage backgroundImageForBarPositionBarMetrics​(long barPosition,
                                                               long barMetrics)
      • barStyle

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

        public UIColor barTintColor()
        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

        public UIImage imageForSearchBarIconState​(long icon,
                                                  long state)
      • inputAccessoryView

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

        public 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.
        Overrides:
        inputAssistantItem in class UIResponder
      • isSearchResultsButtonSelected

        public boolean isSearchResultsButtonSelected()
        default is NO
      • setSearchResultsButtonSelected

        public void setSearchResultsButtonSelected​(boolean value)
        default is NO
      • isTranslucent

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

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

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

        public UIOffset positionAdjustmentForSearchBarIcon​(long icon)
      • prompt

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

        public UIImage scopeBarBackgroundImage()
      • scopeBarButtonBackgroundImageForState

        public UIImage scopeBarButtonBackgroundImageForState​(long state)
      • scopeBarButtonDividerImageForLeftSegmentStateRightSegmentState

        public UIImage scopeBarButtonDividerImageForLeftSegmentStateRightSegmentState​(long leftState,
                                                                                      long rightState)
      • scopeBarButtonTitleTextAttributesForState

        public NSDictionary<java.lang.String,​?> scopeBarButtonTitleTextAttributesForState​(long state)
      • scopeButtonTitles

        public NSArray<java.lang.String> scopeButtonTitles()
        array of NSStrings. no scope bar shown unless 2 or more items
      • searchBarStyle

        public long searchBarStyle()
      • searchFieldBackgroundImageForState

        public UIImage searchFieldBackgroundImageForState​(long state)
      • searchFieldBackgroundPositionAdjustment

        public UIOffset searchFieldBackgroundPositionAdjustment()
        To nudge the position of the search text field background in the search bar
      • searchTextPositionAdjustment

        public UIOffset searchTextPositionAdjustment()
        To nudge the position of the text within the search text field background
      • selectedScopeButtonIndex

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

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

        public void setBackgroundImageForBarPositionBarMetrics​(UIImage backgroundImage,
                                                               long barPosition,
                                                               long barMetrics)
        Use UIBarMetricsDefaultPrompt to set a separate backgroundImage for a search bar with a prompt
      • setBarStyle

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

        public void setBarTintColor​(UIColor value)
        default is nil
      • setDelegate_unsafe

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

        public void setDelegate​(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​(UIImage iconImage,
                                                  long icon,
                                                  long state)
      • setInputAccessoryView

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

        public void setPlaceholder​(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
      • setPrompt

        public void setPrompt​(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​(UIImage value)
      • setScopeBarButtonBackgroundImageForState

        public void setScopeBarButtonBackgroundImageForState​(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.
      • setScopeBarButtonDividerImageForLeftSegmentStateRightSegmentState

        public void setScopeBarButtonDividerImageForLeftSegmentStateRightSegmentState​(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).
      • setScopeBarButtonTitleTextAttributesForState

        public void setScopeBarButtonTitleTextAttributesForState​(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.
      • setScopeButtonTitles

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

        public void setSearchBarStyle​(long value)
      • setSearchFieldBackgroundImageForState

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

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

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

        public void setSelectedScopeButtonIndex​(long value)
        index into array of scope button titles. default is 0. ignored if out of range
      • 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)
      • setShowsScopeBar

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

        public void setShowsSearchResultsButton​(boolean value)
        default is NO
      • setText

        public void setText​(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
      • showsSearchResultsButton

        public boolean showsSearchResultsButton()
        default is NO
      • text

        public 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
      • setShowsScopeBarAnimated

        public void setShowsScopeBarAnimated​(boolean show,
                                             boolean animate)