Package apple.social

Class SLComposeServiceViewController

    • Constructor Detail

      • SLComposeServiceViewController

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • attemptRotationToDeviceOrientation

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

        public static void clearTextInputContextIdentifier​(@NotNull
                                                           @NotNull java.lang.String identifier)
      • 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()
      • 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)
      • resolveClassMethod

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

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

        public static void setVersion_static​(long aVersion)
      • superclass_static

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

        public static long version_static()
      • autoCompletionViewController

        public UIViewController autoCompletionViewController()
        A view controller whose view replaces the configuration item table, sitting just below the text view. Defaults to nil. Set this to a non-nil view controller to implement a mentions picker or something similar. The view controller should set preferredContentSize appropriately. SLComposeServiceViewController observes changes to that property and animates sheet size changes as necessary. Set it to nil to remove your view controller, thus restoring the configuration item table. SLComposeServiceViewController animates the addition/removal of the view controller's view, as appropriate.
      • cancel

        public void cancel()
        Triggers an animated dismissal of the sheet, and then calls -didSelectCancel. Subclasses do not typically need to call this manually, but may choose to in response to a catastrophic failure during the user's interaction with the sheet. Subclasses should not need to override this.
      • charactersRemaining

        public NSNumber charactersRemaining()
        Set/change this to something non-nil to cause the character count view to appear/redraw. This is useful for services that have a character count limit on their posts. Defaults to nil.
      • configurationItems

        public NSArray<?> configurationItems()
        Subclasses should implement this, and return an array of SLComposeSheetConfigurationItem instances, if if needs to display configuration items in the sheet. Defaults to nil.
      • contentText

        public java.lang.String contentText()
        Convenience. This returns the current text from the textView.
      • didSelectCancel

        public void didSelectCancel()
        Called after the cancel animation has finished (in response to the user selecting the Cancel button, or someone calling -cancel). The default implementation calls the extensionContext's -cancelRequestWithError: method with an NSError/NSUserCancelledError. Subclasses may override this in order to customize the extensionContext completion.
      • didSelectPost

        public void didSelectPost()
        Called after the post animation has finished (in response to the user selecting the Post button). The default implementation calls the extensionContext's -completeRequestReturningItems:completionHandler: method with nil. Subclasses must override this in order to peform the post, based on contentText and any attachments. Subclasses may call super in order to leverage the default completion behavior; if a subclass does not call super, it must call extensionContext's completion method manually.
      • initWithNibNameBundle

        public SLComposeServiceViewController initWithNibNameBundle​(@Nullable
                                                                    @Nullable java.lang.String nibNameOrNil,
                                                                    @Nullable
                                                                    @Nullable NSBundle nibBundleOrNil)
        Description copied from class: UIViewController
        The designated initializer. If you subclass UIViewController, you must call the super implementation of this method, even if you aren't using a NIB. (As a convenience, the default init method will do this for you, and specify nil for both of this methods arguments.) In the specified NIB, the File's Owner proxy should have its class set to your view controller subclass, with the view outlet connected to the main view. If you invoke this method with a nil nib name, then this class' -loadView method will attempt to load a NIB whose name is the same as your view controller's class. If no such NIB in fact exists then you must either call -setView: before -view is invoked, or override the -loadView method to set up your views programatically.
        Overrides:
        initWithNibNameBundle in class UIViewController
      • isContentValid

        public boolean isContentValid()
        Called automatically after each text change to help determine the enable state of the Post button, and to give the subclass a chance to update charactersRemaining. Defaults to YES. Subclasses should override this, and return whether contentText and attachments are currently valid for posting.
      • loadPreviewView

        public UIView loadPreviewView()
        Called when it's time to create a view suitable for previewing the attachments on the extensionContext. Defaults to returning a UIView instance appropriate to the set of attachments in the extensionContext, or nil if a preview is unneccessary for the extensionContext. Subclasses can override this to supply a preview view of their own choosing for the set of attachments on the extensionContext.
      • placeholder

        public java.lang.String placeholder()
        When textView is empty, this string is displayed instead. NOTE: This uses the iOS naming convention: "placeholder" vs. "placeholderString" on OS X.
      • popConfigurationViewController

        public void popConfigurationViewController()
        Dismisses the current configuration view controller.
      • presentationAnimationDidFinish

        public void presentationAnimationDidFinish()
        Called when the sheet presentation animation is finished. Subclasses should implement this to begin performing any expensive work (e.g., messaging a server), instead of during initialization, -viewWillAppear, or -viewDidAppear.
      • pushConfigurationViewController

        public void pushConfigurationViewController​(UIViewController viewController)
        Presents a configuration view controller. Typically called from a configuration item's tapHandler. Only one configuration view controller is allowed at a time. The pushed view controller should set preferredContentSize appropriately. SLComposeServiceViewController observes changes to that property and animates sheet size changes as necessary.
      • reloadConfigurationItems

        public void reloadConfigurationItems()
        Forces a reload of the configuration items table. This is typically only necessary for subclasses that determine their configuration items in a deferred manner (for example, in -presentationAnimationDidFinish). You do not need to call this after changing a configuration item property; the base class detects and reacts to that automatically.
      • setAutoCompletionViewController

        public void setAutoCompletionViewController​(UIViewController value)
        A view controller whose view replaces the configuration item table, sitting just below the text view. Defaults to nil. Set this to a non-nil view controller to implement a mentions picker or something similar. The view controller should set preferredContentSize appropriately. SLComposeServiceViewController observes changes to that property and animates sheet size changes as necessary. Set it to nil to remove your view controller, thus restoring the configuration item table. SLComposeServiceViewController animates the addition/removal of the view controller's view, as appropriate.
      • setCharactersRemaining

        public void setCharactersRemaining​(NSNumber value)
        Set/change this to something non-nil to cause the character count view to appear/redraw. This is useful for services that have a character count limit on their posts. Defaults to nil.
      • setPlaceholder

        public void setPlaceholder​(java.lang.String value)
        When textView is empty, this string is displayed instead. NOTE: This uses the iOS naming convention: "placeholder" vs. "placeholderString" on OS X.
      • textViewShouldInteractWithURLInRangeInteraction

        @Deprecated
        public boolean textViewShouldInteractWithURLInRangeInteraction​(@NotNull
                                                                       @NotNull UITextView textView,
                                                                       @NotNull
                                                                       @NotNull NSURL URL,
                                                                       NSRange characterRange,
                                                                       long interaction)
        Deprecated.
        Description copied from interface: UITextViewDelegate
        API-Since: 10.0 Deprecated-Since: 17.0 Deprecated-Message: Replaced by primaryActionForTextItem: and menuConfigurationForTextItem: for additional customization options.
        Specified by:
        textViewShouldInteractWithURLInRangeInteraction in interface UITextViewDelegate
      • validateContent

        public void validateContent()
        Calls -isContentValid immediately, performs other internal validation, then updates the enable state of the Post button appropriately. Subclasses should call this whenever they change data used as part of validity checking in their implementation of -isContentValid.
      • textViewEditMenuForTextInRangeSuggestedActions

        @Nullable
        public @Nullable UIMenu textViewEditMenuForTextInRangeSuggestedActions​(@NotNull
                                                                               @NotNull UITextView textView,
                                                                               NSRange range,
                                                                               @NotNull
                                                                               @NotNull NSArray<? extends UIMenuElement> suggestedActions)
        Description copied from interface: UITextViewDelegate
        Asks the delegate for the menu to be shown for the specified text range.
        Specified by:
        textViewEditMenuForTextInRangeSuggestedActions in interface UITextViewDelegate
        Parameters:
        textView - The text view requesting the menu.
        range - The text range for which the menu is presented for.
        suggestedActions - The actions and commands that the system suggests.
        Returns:
        Return a UIMenu describing the desired menu hierarchy. Return @c nil to present the default system menu. API-Since: 16.0
      • textViewWillDismissEditMenuWithAnimator

        public void textViewWillDismissEditMenuWithAnimator​(@NotNull
                                                            @NotNull UITextView textView,
                                                            @NotNull
                                                            @NotNull UIEditMenuInteractionAnimating animator)
        Description copied from interface: UITextViewDelegate
        Called when the text view is about to dismiss the edit menu.
        Specified by:
        textViewWillDismissEditMenuWithAnimator in interface UITextViewDelegate
        Parameters:
        textView - The text view displaying the menu.
        animator - Dismissal animator. Add animations to this object to run them alongside the dismissal transition. API-Since: 16.0
      • textViewWillPresentEditMenuWithAnimator

        public void textViewWillPresentEditMenuWithAnimator​(@NotNull
                                                            @NotNull UITextView textView,
                                                            @NotNull
                                                            @NotNull UIEditMenuInteractionAnimating animator)
        Description copied from interface: UITextViewDelegate
        Called when the text view is about to present the edit menu.
        Specified by:
        textViewWillPresentEditMenuWithAnimator in interface UITextViewDelegate
        Parameters:
        textView - The text view displaying the menu.
        animator - Appearance animator. Add animations to this object to run them alongside the appearance transition. API-Since: 16.0
      • textViewMenuConfigurationForTextItemDefaultMenu

        @Nullable
        public @Nullable UITextItemMenuConfiguration textViewMenuConfigurationForTextItemDefaultMenu​(@NotNull
                                                                                                     @NotNull UITextView textView,
                                                                                                     @NotNull
                                                                                                     @NotNull UITextItem textItem,
                                                                                                     @NotNull
                                                                                                     @NotNull UIMenu defaultMenu)
        Description copied from interface: UITextViewDelegate
        Asks the delegate for the menu configuration to be performed when interacting with a text item.
        Specified by:
        textViewMenuConfigurationForTextItemDefaultMenu in interface UITextViewDelegate
        Parameters:
        textView - The text view requesting the menu.
        textItem - The text item for performing said action.
        defaultMenu - The default menu for the specified text item.
        Returns:
        Return a menu configuration to be presented when the text item is interacted with. Return @c nil to prevent the menu from being presented. API-Since: 17.0
      • textViewPrimaryActionForTextItemDefaultAction

        @Nullable
        public @Nullable UIAction textViewPrimaryActionForTextItemDefaultAction​(@NotNull
                                                                                @NotNull UITextView textView,
                                                                                @NotNull
                                                                                @NotNull UITextItem textItem,
                                                                                @NotNull
                                                                                @NotNull UIAction defaultAction)
        Description copied from interface: UITextViewDelegate
        Asks the delegate for the action to be performed when interacting with a text item. If a nil action is provided, the text view will request a menu to be presented on primary action if possible.
        Specified by:
        textViewPrimaryActionForTextItemDefaultAction in interface UITextViewDelegate
        Parameters:
        textView - The text view requesting the primary action.
        textItem - The text item for performing said action.
        defaultAction - The default action for the text item. Return this to perform the default action.
        Returns:
        Return a UIAction to be performed when the text item is interacted with. Return @c nil to prevent the action from being performed. API-Since: 17.0
      • textViewTextItemMenuWillDisplayForTextItemAnimator

        public void textViewTextItemMenuWillDisplayForTextItemAnimator​(@NotNull
                                                                       @NotNull UITextView textView,
                                                                       @NotNull
                                                                       @NotNull UITextItem textItem,
                                                                       @NotNull
                                                                       @NotNull UIContextMenuInteractionAnimating animator)
        Description copied from interface: UITextViewDelegate
        Informs the delegate that a text item menu is about to be presented with the specified animator.
        Specified by:
        textViewTextItemMenuWillDisplayForTextItemAnimator in interface UITextViewDelegate
        Parameters:
        textView - The text view showing the menu.
        textItem - The text item for performing said action.
        animator - Appearance animator. Add animations to this object to run them alongside the appearance transition. API-Since: 17.0
      • textViewTextItemMenuWillEndForTextItemAnimator

        public void textViewTextItemMenuWillEndForTextItemAnimator​(@NotNull
                                                                   @NotNull UITextView textView,
                                                                   @NotNull
                                                                   @NotNull UITextItem textItem,
                                                                   @NotNull
                                                                   @NotNull UIContextMenuInteractionAnimating animator)
        Description copied from interface: UITextViewDelegate
        Informs the delegate that a text item menu is about to be dismissed with the specified animator.
        Specified by:
        textViewTextItemMenuWillEndForTextItemAnimator in interface UITextViewDelegate
        Parameters:
        textView - The text view showing the menu.
        textItem - The text item for performing said action.
        animator - Dismissal animator. Add animations to this object to run them alongside the dismissal transition. API-Since: 17.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.