Package apple.uikit

Class UIViewController

    • Constructor Detail

      • UIViewController

        protected UIViewController​(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)
      • attemptRotationToDeviceOrientation

        public static void attemptRotationToDeviceOrientation()
        call this method when your return value from shouldAutorotateToInterfaceOrientation: changes if the current interface orientation does not match the current device orientation, a rotation may occur provided all relevant view controllers now return YES from shouldAutorotateToInterfaceOrientation:
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • 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)
      • 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

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

        public static java.lang.Object new_objc()
      • prepareInterstitialAds

        public static void prepareInterstitialAds()
        prepareInterstitials Ads involve network requests, so if an application needs to use interstitial ads and wants to ensure early availability, this method can be called to trigger a prefetch. If this method is not called, the first fetch will occur when a view controller's interstitialPresentationPolicy is set to something other than ADInterstitialPresentationPolicyNone.
      • 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()
      • addChildViewController

        public void addChildViewController​(UIViewController childController)
        If the child controller has a different parent controller, it will first be removed from its current parent by calling removeFromParentViewController. If this method is overridden then the super implementation must be called.
      • addKeyCommand

        public void addKeyCommand​(UIKeyCommand keyCommand)
      • allowedChildViewControllersForUnwindingFromSource

        public NSArray<? extends UIViewController> allowedChildViewControllersForUnwindingFromSource​(UIStoryboardUnwindSegueSource source)
        Returns a subset of the receiver's childViewControllers in the order they should be searched for an unwind destination. The default implementation first sends itself -childViewControllerContainingSegueSource:, then returns a copy of its childViewControllers array excluding that object. A custom container view controller can override this method to affect the order in which its children are searched, or to modify the result of the default implementation. For compatibility, if a view controller overrides the deprecated -viewControllerForUnwindSegueAction:fromViewController:sender: method, but does not override this method, it will receive the deprecated method instead of this method. To affect this view controller's eligibility as an unwind destination, override -canPerformUnwindSegueAction:fromViewController:sender: instead.
      • applicationFinishedRestoringState

        public void applicationFinishedRestoringState()
        Description copied from interface: UIStateRestoring
        applicationFinishedRestoringState is called on all restored objects that implement the method *after* all other object decoding has been done (including the application delegate). This allows an object to complete setup after state restoration, knowing that all objects from the restoration archive have decoded their state.
        Specified by:
        applicationFinishedRestoringState in interface UIStateRestoring
      • automaticallyAdjustsScrollViewInsets

        public boolean automaticallyAdjustsScrollViewInsets()
        Defaults to YES
      • automaticallyForwardAppearanceAndRotationMethodsToChildViewControllers

        @Deprecated
        public boolean automaticallyForwardAppearanceAndRotationMethodsToChildViewControllers()
        Deprecated.
        This method is consulted to determine if a view controller manually forwards its containment callbacks to any children view controllers. Subclasses of UIViewController that implement containment logic may override this method. The default implementation returns YES. If it is overridden and returns NO, then the subclass is responsible for forwarding the following methods as appropriate - viewWillAppear: viewDidAppear: viewWillDisappear: viewDidDisappear: willRotateToInterfaceOrientation:duration: willAnimateRotationToInterfaceOrientation:duration: didRotateFromInterfaceOrientation:
      • beginAppearanceTransitionAnimated

        public void beginAppearanceTransitionAnimated​(boolean isAppearing,
                                                      boolean animated)
        If a custom container controller manually forwards its appearance callbacks, then rather than calling viewWillAppear:, viewDidAppear: viewWillDisappear:, or viewDidDisappear: on the children these methods should be used instead. This will ensure that descendent child controllers appearance methods will be invoked. It also enables more complex custom transitions to be implemented since the appearance callbacks are now tied to the final matching invocation of endAppearanceTransition.
      • beginRequestWithExtensionContext

        public void beginRequestWithExtensionContext​(NSExtensionContext context)
        Description copied from interface: NSExtensionRequestHandling
        Tells the extension to prepare its interface for the requesting context, and request related data items. At this point [(NS|UI)ViewController extensionContext] returns a non-nil value. This message is delivered after initialization, but before the conforming object will be asked to "do something" with the context (i.e. before -[(NS|UI)ViewController loadView]). Subclasses of classes conforming to this protocol are expected to call [super beginRequestWithExtensionContext:] if this method is overridden.
        Specified by:
        beginRequestWithExtensionContext in interface NSExtensionRequestHandling
      • canDisplayBannerAds

        public boolean canDisplayBannerAds()
        [@property] canDisplayBannerAds Set this to enable automatic management of banner ad display with the view controller. It's important to note that this will modify the view hierarchy of the view controller by inserting a new container view above the view controller's view. The impact is that the view controller's view property will no longer return the originally provided view, it will return the new container. To access the original view, use the originalContentView property.
        See Also:
        originalContentView()
      • canPerformUnwindSegueActionFromViewControllerWithSender

        public boolean canPerformUnwindSegueActionFromViewControllerWithSender​(org.moe.natj.objc.SEL action,
                                                                               UIViewController fromViewController,
                                                                               java.lang.Object sender)
      • childViewControllerContainingSegueSource

        public UIViewController childViewControllerContainingSegueSource​(UIStoryboardUnwindSegueSource source)
        Returns the child view controller that contains the provided segue source. Custom container view controllers should call this method from their implementation of -allowedChildViewControllersForUnwindingFromSource: to exclude the result from the returned array, as well as to determine the order of the returned array's contents. Do not try to re-implement or override this method; it takes special care to handle situations such as unwinding from a modally-presented view controller.
      • childViewControllerForStatusBarHidden

        public UIViewController childViewControllerForStatusBarHidden()
      • childViewControllerForStatusBarStyle

        public UIViewController childViewControllerForStatusBarStyle()
        Override to return a child view controller or nil. If non-nil, that view controller's status bar appearance attributes will be used. If nil, self is used. Whenever the return values from these methods change, -setNeedsStatusBarAppearanceUpdate should be called.
      • childViewControllers

        public NSArray<? extends UIViewController> childViewControllers()
        An array of children view controllers. This array does not include any presented view controllers.
      • collapseSecondaryViewControllerForSplitViewController

        public void collapseSecondaryViewControllerForSplitViewController​(UIViewController secondaryViewController,
                                                                          UISplitViewController splitViewController)
        Called on the primary view controller when a split view controller is collapsing its children for a transition to a compact-width size class, if its delegate does not provide overridden behavior. The default implementation simply shows the primary (the secondary controller disappears.)
      • contentSizeForViewInPopover

        @Deprecated
        public CGSize contentSizeForViewInPopover()
        Deprecated.
        contentSizeForViewInPopover allows you to set the size of the content from within the view controller. This property is read/write, and you should generally not override it.
      • definesPresentationContext

        public boolean definesPresentationContext()
        Determines which parent view controller's view should be presented over for presentations of type UIModalPresentationCurrentContext. If no ancestor view controller has this flag set, then the presenter will be the root view controller.
      • didAnimateFirstHalfOfRotationToInterfaceOrientation

        @Deprecated
        public void didAnimateFirstHalfOfRotationToInterfaceOrientation​(long toInterfaceOrientation)
        Deprecated.
        The rotating header and footer views are offscreen.
      • didMoveToParentViewController

        public void didMoveToParentViewController​(UIViewController parent)
      • didReceiveMemoryWarning

        public void didReceiveMemoryWarning()
        Called when the parent application receives a memory warning. On iOS 6.0 it will no longer clear the view by default.
      • didRotateFromInterfaceOrientation

        @Deprecated
        public void didRotateFromInterfaceOrientation​(long fromInterfaceOrientation)
        Deprecated.
      • disablesAutomaticKeyboardDismissal

        public boolean disablesAutomaticKeyboardDismissal()
        Presentation modes may keep the keyboard visible when not required. Default implementation affects UIModalPresentationFormSheet visibility.
      • dismissModalViewControllerAnimated

        @Deprecated
        public void dismissModalViewControllerAnimated​(boolean animated)
        Deprecated.
        Dismiss the current modal child. Uses a vertical sheet transition if animated. This method has been replaced by dismissViewControllerAnimated:completion:
      • dismissMoviePlayerViewControllerAnimated

        @Deprecated
        public void dismissMoviePlayerViewControllerAnimated()
        Deprecated.
      • dismissViewControllerAnimatedCompletion

        public void dismissViewControllerAnimatedCompletion​(boolean flag,
                                                            UIViewController.Block_dismissViewControllerAnimatedCompletion completion)
        The completion handler, if provided, will be invoked after the dismissed controller's viewDidDisappear: callback is invoked.
      • edgesForExtendedLayout

        public long edgesForExtendedLayout()
        Defaults to UIRectEdgeAll
      • editButtonItem

        public UIBarButtonItem editButtonItem()
        Return an Edit|Done button that can be used as a navigation item's custom view. Default action toggles the editing state with animation.
      • encodeRestorableStateWithCoder

        public void encodeRestorableStateWithCoder​(NSCoder coder)
        Description copied from interface: UIStateRestoring
        Methods to save and restore state for the object. If these aren't implemented, the object can still be referenced by other objects in state restoration archives, but it won't save/restore any state of its own.
        Specified by:
        encodeRestorableStateWithCoder in interface UIStateRestoring
      • endAppearanceTransition

        public void endAppearanceTransition()
      • extendedLayoutIncludesOpaqueBars

        public boolean extendedLayoutIncludesOpaqueBars()
        Defaults to NO, but bars are translucent by default on 7_0.
      • extensionContext

        public NSExtensionContext extensionContext()
        Returns the extension context. Also acts as a convenience method for a view controller to check if it participating in an extension request.
      • hidesBottomBarWhenPushed

        public boolean hidesBottomBarWhenPushed()
        If YES, then when this view controller is pushed into a controller hierarchy with a bottom bar (like a tab bar), the bottom bar will slide out. Default is NO.
      • initWithNibNameBundle

        public UIViewController initWithNibNameBundle​(java.lang.String nibNameOrNil,
                                                      NSBundle nibBundleOrNil)
        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.
      • interfaceOrientation

        @Deprecated
        public long interfaceOrientation()
        Deprecated.
      • interstitialPresentationPolicy

        public long interstitialPresentationPolicy()
        [@property] interstitialPresentationPolicy The presentation policy determines whether the timing of presentation is entirely managed by the framework or should only take place when the application calls -requestInterstitialAdPresentation. By default the policy is "None", so to be able to present an interstitial it must be changed to either "Automatic" or "Manual".
      • isBeingDismissed

        public boolean isBeingDismissed()
      • isBeingPresented

        public boolean isBeingPresented()
        These four methods can be used in a view controller's appearance callbacks to determine if it is being presented, dismissed, or added or removed as a child view controller. For example, a view controller can check if it is disappearing because it was dismissed or popped by asking itself in its viewWillDisappear: method by checking the expression ([self isBeingDismissed] || [self isMovingFromParentViewController]).
      • isDisplayingBannerAd

        public boolean isDisplayingBannerAd()
        [@property] displayingBannerAd Can be used to query the controller to determine if it is displaying a banner ad.
      • isEditing

        public boolean isEditing()
      • setEditing

        public void setEditing​(boolean value)
      • isModalInPopover

        public boolean isModalInPopover()
        modalInPopover is set on the view controller when you wish to force the popover hosting the view controller into modal behavior. When this is active, the popover will ignore events outside of its bounds until this is set to NO.
      • setModalInPopover

        public void setModalInPopover​(boolean value)
        modalInPopover is set on the view controller when you wish to force the popover hosting the view controller into modal behavior. When this is active, the popover will ignore events outside of its bounds until this is set to NO.
      • isMovingFromParentViewController

        public boolean isMovingFromParentViewController()
      • isMovingToParentViewController

        public boolean isMovingToParentViewController()
      • isPresentingFullScreenAd

        public boolean isPresentingFullScreenAd()
        [@property] presentingFullScreenAd Can be used to query the controller to determine if it is presenting a full screen ad, which may be an interstitial or the iAd shown when the user taps a banner.
      • isViewLoaded

        public boolean isViewLoaded()
      • loadView

        public void loadView()
        This is where subclasses should create their custom view hierarchy if they aren't using a nib. Should never be called directly.
      • loadViewIfNeeded

        public void loadViewIfNeeded()
        Loads the view controller's view if it has not already been set.
      • modalPresentationCapturesStatusBarAppearance

        public boolean modalPresentationCapturesStatusBarAppearance()
        This controls whether this view controller takes over control of the status bar's appearance when presented non-full screen on another view controller. Defaults to NO.
      • modalPresentationStyle

        public long modalPresentationStyle()
        Defines the presentation style that will be used for this view controller when it is presented modally. Set this property on the view controller to be presented, not the presenter. If this property has been set to UIModalPresentationAutomatic, reading it will always return a concrete presentation style. By default UIViewController resolves UIModalPresentationAutomatic to UIModalPresentationPageSheet, but system-provided subclasses may resolve UIModalPresentationAutomatic to other concrete presentation styles. Participation in the resolution of UIModalPresentationAutomatic is reserved for system-provided view controllers. Defaults to UIModalPresentationAutomatic on iOS starting in iOS 13.0, and UIModalPresentationFullScreen on previous versions. Defaults to UIModalPresentationFullScreen on all other platforms.
      • modalTransitionStyle

        public long modalTransitionStyle()
        Defines the transition style that will be used for this view controller when it is presented modally. Set this property on the view controller to be presented, not the presenter. Defaults to UIModalTransitionStyleCoverVertical.
      • modalViewController

        @Deprecated
        public UIViewController modalViewController()
        Deprecated.
        This property has been replaced by presentedViewController.
      • navigationController

        public UINavigationController navigationController()
        If this view controller has been pushed onto a navigation controller, return it.
      • navigationItem

        public UINavigationItem navigationItem()
        Created on-demand so that a view controller may customize its navigation appearance.
      • nibBundle

        public NSBundle nibBundle()
        The bundle from which to load the nib.
      • nibName

        public java.lang.String nibName()
        The name of the nib to be loaded to instantiate the view.
      • originalContentView

        public UIView originalContentView()
        [@property] originalContentView If banner ads have not been enabled, originalContentView will return the view controller's view. If banner ads are enabled, originalContentView returns the view that was previously the view controller's view. If banner ads are then subsequently disabled, the view controller's content view will remain embedded - that operation will not be reversed.
      • parentViewController

        public UIViewController parentViewController()
        If this view controller is a child of a containing view controller (e.g. a navigation controller or tab bar controller,) this is the containing view controller. Note that as of 5.0 this no longer will return the presenting view controller.
      • performSegueWithIdentifierSender

        public void performSegueWithIdentifierSender​(java.lang.String identifier,
                                                     java.lang.Object sender)
      • preferredFocusEnvironments

        public NSArray<?> preferredFocusEnvironments()
        Description copied from interface: UIFocusEnvironment
        The preferred focus environments define where to search for the default focused item in an environment, such as when focus updates programmatically. Starting from the target environment, each preferred focus environment is recursively searched in the order of the array until an eligible, focusable item is found. Preferred focus environments can include focusable and non-focusable items, in addition to non-item environments. Returning an empty array is equivalent to returning an array containing only 'self'.
        Specified by:
        preferredFocusEnvironments in interface UIFocusEnvironment
      • preferredInterfaceOrientationForPresentation

        public long preferredInterfaceOrientationForPresentation()
        Returns interface orientation masks.
      • preferredStatusBarStyle

        public long preferredStatusBarStyle()
        Defaults to UIStatusBarStyleDefault
      • preferredStatusBarUpdateAnimation

        public long preferredStatusBarUpdateAnimation()
        Defaults to UIStatusBarAnimationFade
      • prefersStatusBarHidden

        public boolean prefersStatusBarHidden()
        Defaults to NO
      • prepareForSegueSender

        public void prepareForSegueSender​(UIStoryboardSegue segue,
                                          java.lang.Object sender)
      • presentModalViewControllerAnimated

        @Deprecated
        public void presentModalViewControllerAnimated​(UIViewController modalViewController,
                                                       boolean animated)
        Deprecated.
        Display another view controller as a modal child. Uses a vertical sheet transition if animated.This method has been replaced by presentViewController:animated:completion:
      • presentMoviePlayerViewControllerAnimated

        @Deprecated
        public void presentMoviePlayerViewControllerAnimated​(MPMoviePlayerViewController moviePlayerViewController)
        Deprecated.
      • presentViewControllerAnimatedCompletion

        public void presentViewControllerAnimatedCompletion​(UIViewController viewControllerToPresent,
                                                            boolean flag,
                                                            UIViewController.Block_presentViewControllerAnimatedCompletion completion)
        The next two methods are replacements for presentModalViewController:animated and dismissModalViewControllerAnimated: The completion handler, if provided, will be invoked after the presented controllers viewDidAppear: callback is invoked.
      • presentedViewController

        public UIViewController presentedViewController()
        The view controller that was presented by this view controller or its nearest ancestor.
      • presentingViewController

        public UIViewController presentingViewController()
        The view controller that presented this view controller (or its farthest ancestor.)
      • previewActionItems

        public NSArray<?> previewActionItems()
      • providesPresentationContextTransitionStyle

        public boolean providesPresentationContextTransitionStyle()
        A controller that defines the presentation context can also specify the modal transition style if this property is true.
      • removeFromParentViewController

        public void removeFromParentViewController()
        Removes the the receiver from its parent's children controllers array. If this method is overridden then the super implementation must be called.
      • removeKeyCommand

        public void removeKeyCommand​(UIKeyCommand keyCommand)
      • requestInterstitialAdPresentation

        public boolean requestInterstitialAdPresentation()
        requestInterstitialAdPresentation Call at any time to request that an interstitial ad be presented. This is appropriate for view controllers that are on screen for long periods of time and internally manage significant state changes, such as game levels. Returns YES if an interstitial will be presented.
        Returns:
        Returns YES if an interstitial can be displayed, NO if not.
      • restorationIdentifier

        public java.lang.String restorationIdentifier()
      • restorationParent

        public UIStateRestoring restorationParent()
        Description copied from interface: UIStateRestoring
        The parent property is used to scope the restoration identifier path for an object, to disambiguate it from other objects that might be using the same identifier. The parent must be a restorable object or a view controller, else it will be ignored.
        Specified by:
        restorationParent in interface UIStateRestoring
      • restoresFocusAfterTransition

        public boolean restoresFocusAfterTransition()
        If YES, when this view controller becomes visible and focusable, focus will be automatically restored to the item that was last focused. For example, when an item in this view controller is focused, and then another view controller is presented and dismissed, the original item will become focused again. Defaults to YES.
      • rotatingFooterView

        @Deprecated
        public UIView rotatingFooterView()
        Deprecated.
        Must be in the view hierarchy. Default returns nil.
      • rotatingHeaderView

        @Deprecated
        public UIView rotatingHeaderView()
        Deprecated.
        Must be in the view hierarchy. Default returns nil.
      • segueForUnwindingToViewControllerFromViewControllerIdentifier

        @Deprecated
        public UIStoryboardSegue segueForUnwindingToViewControllerFromViewControllerIdentifier​(UIViewController toViewController,
                                                                                               UIViewController fromViewController,
                                                                                               java.lang.String identifier)
        Deprecated.
        Deprecated. This method is only used for unwind segues whose destination view controller has been returned by an override of the deprecated method -viewControllerForUnwindSegueAction:fromViewController:withSender:. In that case, UIKit will choose a view controller to act as the “executor” of the unwind. If the destination view controller is being modally presented, the destination view controller itself is the executor. Otherwise, the destination view controller’s parent view controller is the executor. If the executor overrides this method, UIKit will ignore the Custom Class specified in Interface Builder and instead call this method on the executor to obtain a segue that can perform the unwind. The returned segue object must be able to perform all steps necessary to unwind, including dismissing any intermediate modal presentations or popping any necessary navigation items. Applications targeting iOS 9 or later should not override this method. Custom container view controllers should instead override -unwindForSegue:towardsViewController: to modify their local state as part of a UIKit-generated incremental unwind segue.
      • separateSecondaryViewControllerForSplitViewController

        public UIViewController separateSecondaryViewControllerForSplitViewController​(UISplitViewController splitViewController)
        Called on the primary view controller when a split view controller is separating its children for a transition to a regular-width size class, if its delegate does not provide overridden behavior. The default implementation restores the previous secondary controller.
      • setAutomaticallyAdjustsScrollViewInsets

        public void setAutomaticallyAdjustsScrollViewInsets​(boolean value)
        Defaults to YES
      • setCanDisplayBannerAds

        public void setCanDisplayBannerAds​(boolean value)
        [@property] canDisplayBannerAds Set this to enable automatic management of banner ad display with the view controller. It's important to note that this will modify the view hierarchy of the view controller by inserting a new container view above the view controller's view. The impact is that the view controller's view property will no longer return the originally provided view, it will return the new container. To access the original view, use the originalContentView property.
        See Also:
        originalContentView()
      • setContentSizeForViewInPopover

        @Deprecated
        public void setContentSizeForViewInPopover​(CGSize value)
        Deprecated.
        contentSizeForViewInPopover allows you to set the size of the content from within the view controller. This property is read/write, and you should generally not override it.
      • setDefinesPresentationContext

        public void setDefinesPresentationContext​(boolean value)
        Determines which parent view controller's view should be presented over for presentations of type UIModalPresentationCurrentContext. If no ancestor view controller has this flag set, then the presenter will be the root view controller.
      • setEdgesForExtendedLayout

        public void setEdgesForExtendedLayout​(long value)
        Defaults to UIRectEdgeAll
      • setEditingAnimated

        public void setEditingAnimated​(boolean editing,
                                       boolean animated)
        Updates the appearance of the Edit|Done button item as necessary. Clients who override it must call super first.
      • setExtendedLayoutIncludesOpaqueBars

        public void setExtendedLayoutIncludesOpaqueBars​(boolean value)
        Defaults to NO, but bars are translucent by default on 7_0.
      • setHidesBottomBarWhenPushed

        public void setHidesBottomBarWhenPushed​(boolean value)
        If YES, then when this view controller is pushed into a controller hierarchy with a bottom bar (like a tab bar), the bottom bar will slide out. Default is NO.
      • setInterstitialPresentationPolicy

        public void setInterstitialPresentationPolicy​(long value)
        [@property] interstitialPresentationPolicy The presentation policy determines whether the timing of presentation is entirely managed by the framework or should only take place when the application calls -requestInterstitialAdPresentation. By default the policy is "None", so to be able to present an interstitial it must be changed to either "Automatic" or "Manual".
      • setModalPresentationCapturesStatusBarAppearance

        public void setModalPresentationCapturesStatusBarAppearance​(boolean value)
        This controls whether this view controller takes over control of the status bar's appearance when presented non-full screen on another view controller. Defaults to NO.
      • setModalPresentationStyle

        public void setModalPresentationStyle​(long value)
        Defines the presentation style that will be used for this view controller when it is presented modally. Set this property on the view controller to be presented, not the presenter. If this property has been set to UIModalPresentationAutomatic, reading it will always return a concrete presentation style. By default UIViewController resolves UIModalPresentationAutomatic to UIModalPresentationPageSheet, but system-provided subclasses may resolve UIModalPresentationAutomatic to other concrete presentation styles. Participation in the resolution of UIModalPresentationAutomatic is reserved for system-provided view controllers. Defaults to UIModalPresentationAutomatic on iOS starting in iOS 13.0, and UIModalPresentationFullScreen on previous versions. Defaults to UIModalPresentationFullScreen on all other platforms.
      • setModalTransitionStyle

        public void setModalTransitionStyle​(long value)
        Defines the transition style that will be used for this view controller when it is presented modally. Set this property on the view controller to be presented, not the presenter. Defaults to UIModalTransitionStyleCoverVertical.
      • setNeedsFocusUpdate

        public void setNeedsFocusUpdate()
        Description copied from interface: UIFocusEnvironment
        Marks this environment as needing a focus update, which if accepted will attempt to reset focus to this environment, or one of its preferred focus environments, on the next update cycle. If this environment does not currently contain the focused item, then calling this method has no effect. If a parent of this environment is also requesting focus, then this environment's request is rejected in favor of the parent's. NOTE: If you provide your own implementation, it must call `[[UIFocusSystem focusSystemForEnvironment:self] requestFocusUpdateToEnvironment:self]`;
        Specified by:
        setNeedsFocusUpdate in interface UIFocusEnvironment
      • setNeedsStatusBarAppearanceUpdate

        public void setNeedsStatusBarAppearanceUpdate()
        This should be called whenever the return values for the view controller's status bar attributes have changed. If it is called from within an animation block, the changes will be animated along with the rest of the animation block.
      • setOverrideTraitCollectionForChildViewController

        public void setOverrideTraitCollectionForChildViewController​(UITraitCollection collection,
                                                                     UIViewController childViewController)
        Call to modify the trait collection for child view controllers.
      • setPreferredContentSize

        public void setPreferredContentSize​(CGSize value)
        The preferredContentSize is used for any container laying out a child view controller.
      • setProvidesPresentationContextTransitionStyle

        public void setProvidesPresentationContextTransitionStyle​(boolean value)
        A controller that defines the presentation context can also specify the modal transition style if this property is true.
      • setRestorationIdentifier

        public void setRestorationIdentifier​(java.lang.String value)
      • setRestoresFocusAfterTransition

        public void setRestoresFocusAfterTransition​(boolean value)
        If YES, when this view controller becomes visible and focusable, focus will be automatically restored to the item that was last focused. For example, when an item in this view controller is focused, and then another view controller is presented and dismissed, the original item will become focused again. Defaults to YES.
      • setTabBarItem

        public void setTabBarItem​(UITabBarItem value)
        Automatically created lazily with the view controller's title if it's not set explicitly.
      • setTitle

        public void setTitle​(java.lang.String value)
        Localized title for use by a parent controller.
      • setToolbarItemsAnimated

        public void setToolbarItemsAnimated​(NSArray<? extends UIBarButtonItem> toolbarItems,
                                            boolean animated)
      • setView

        public void setView​(UIView value)
        The getter first invokes [self loadView] if the view hasn't been set yet. Subclasses must call super if they override the setter or getter.
      • setWantsFullScreenLayout

        @Deprecated
        public void setWantsFullScreenLayout​(boolean value)
        Deprecated.
        Deprecated in 7_0, Replaced by the following:
      • shouldAutomaticallyForwardAppearanceMethods

        public boolean shouldAutomaticallyForwardAppearanceMethods()
      • shouldAutomaticallyForwardRotationMethods

        @Deprecated
        public boolean shouldAutomaticallyForwardRotationMethods()
        Deprecated.
      • shouldAutorotate

        public boolean shouldAutorotate()
        New Autorotation support.
      • shouldAutorotateToInterfaceOrientation

        @Deprecated
        public boolean shouldAutorotateToInterfaceOrientation​(long toInterfaceOrientation)
        Deprecated.
        Applications should use supportedInterfaceOrientations and/or shouldAutorotate.
      • shouldPerformSegueWithIdentifierSender

        public boolean shouldPerformSegueWithIdentifierSender​(java.lang.String identifier,
                                                              java.lang.Object sender)
        Invoked immediately prior to initiating a segue. Return NO to prevent the segue from firing. The default implementation returns YES. This method is not invoked when -performSegueWithIdentifier:sender: is used.
      • shouldPresentInterstitialAd

        public boolean shouldPresentInterstitialAd()
        shouldPresentInterstitialAd Subclasses should override this method if they use ADInterstitialPresentationPolicyAutomatic and require the ability to selectively prevent presentation based on application state. The method will be invoked when the framework is about to present an interstitial ad in the ADInterstitialPresentationPolicyAutomatic configuration.
        Returns:
        Should return YES to allow presentation to proceed, NO to prevent it. The default implementation always returns YES.
      • showDetailViewControllerSender

        public void showDetailViewControllerSender​(UIViewController vc,
                                                   java.lang.Object sender)
        This method will show a view controller within the semantic "detail" UI associated with the current size-class environment. It's implementation calls `[self targetViewControllerForAction:sender:]` first and redirects accordingly if the return value is not `self`, otherwise it will present the vc.
      • showViewControllerSender

        public void showViewControllerSender​(UIViewController vc,
                                             java.lang.Object sender)
        This method will show a view controller appropriately for the current size-class environment. It's implementation calls `[self targetViewControllerForAction:sender:]` first and redirects accordingly if the return value is not `self`, otherwise it will present the vc.
      • sizeForChildContentContainerWithParentContainerSize

        public CGSize sizeForChildContentContainerWithParentContainerSize​(UIContentContainer container,
                                                                          CGSize parentSize)
        Description copied from interface: UIContentContainer
        When the content container forwards viewWillTransitionToSize:withTransitionCoordinator: to its children, it will call this method to determine what size to send them. If the returned size is the same as the child container's current size, viewWillTransitionToSize:withTransitionCoordinator: will not be called.
        Specified by:
        sizeForChildContentContainerWithParentContainerSize in interface UIContentContainer
      • splitViewController

        public UISplitViewController splitViewController()
        If the view controller has a split view controller as its ancestor, return it. Returns nil otherwise.
      • supportedInterfaceOrientations

        public long supportedInterfaceOrientations()
      • systemLayoutFittingSizeDidChangeForChildContentContainer

        public void systemLayoutFittingSizeDidChangeForChildContentContainer​(UIContentContainer container)
        Description copied from interface: UIContentContainer
        Intended as a bridge for a view controller that does not use auto layout presenting a child that does use auto layout. If the child's view is using auto layout and the -systemLayoutSizeFittingSize: of the view changes, -systemLayoutFittingSizeDidChangeForChildContentContainer: will be sent to the view controller's parent.
        Specified by:
        systemLayoutFittingSizeDidChangeForChildContentContainer in interface UIContentContainer
      • tabBarController

        public UITabBarController tabBarController()
        If the view controller has a tab bar controller as its ancestor, return it. Returns nil otherwise.
      • tabBarItem

        public UITabBarItem tabBarItem()
        Automatically created lazily with the view controller's title if it's not set explicitly.
      • targetViewControllerForActionSender

        public UIViewController targetViewControllerForActionSender​(org.moe.natj.objc.SEL action,
                                                                    java.lang.Object sender)
        This method returns either itself or the nearest ancestor that can perform the given action and, if applicable, has overridden UIViewController's default implementation of the action method. View controllers can return NO from canPerformAction:withSender: to opt out of being a target for a given action.
      • title

        public java.lang.String title()
        Localized title for use by a parent controller.
      • topLayoutGuide

        public UILayoutSupport topLayoutGuide()
        These objects may be used as layout items in the NSLayoutConstraint API
      • transitionCoordinator

        public UIViewControllerTransitionCoordinator transitionCoordinator()
        The default implementation will return a transition coordinator if called during an active presentation or dismissal. Otherwise it will ask the parent view controller. This method, if overridden, can first check if there is an appropriate transition coordinator to return, otherwise it should call super. Only custom container view controllers should ever need to override this method.
      • transitionFromViewControllerToViewControllerDurationOptionsAnimationsCompletion

        public void transitionFromViewControllerToViewControllerDurationOptionsAnimationsCompletion​(UIViewController fromViewController,
                                                                                                    UIViewController toViewController,
                                                                                                    double duration,
                                                                                                    long options,
                                                                                                    UIViewController.Block_transitionFromViewControllerToViewControllerDurationOptionsAnimationsCompletion_4 animations,
                                                                                                    UIViewController.Block_transitionFromViewControllerToViewControllerDurationOptionsAnimationsCompletion_5 completion)
        This method can be used to transition between sibling child view controllers. The receiver of this method is their common parent view controller. (Use [UIViewController addChildViewController:] to create the parent/child relationship.) This method will add the toViewController's view to the superview of the fromViewController's view and the fromViewController's view will be removed from its superview after the transition completes. It is important to allow this method to add and remove the views. The arguments to this method are the same as those defined by UIView's block animation API. This method will fail with an NSInvalidArgumentException if the parent view controllers are not the same as the receiver, or if the receiver explicitly forwards its appearance and rotation callbacks to its children. Finally, the receiver should not be a subclass of an iOS container view controller. Note also that it is possible to use the UIView APIs directly. If they are used it is important to ensure that the toViewController's view is added to the visible view hierarchy while the fromViewController's view is removed.
      • unwindForSegueTowardsViewController

        public void unwindForSegueTowardsViewController​(UIStoryboardSegue unwindSegue,
                                                        UIViewController subsequentVC)
        Custom container view controllers should override this method to modify themselves as part of an ongoing unwind segue. The subsequentVC is the parent, child, or presented view controller closest to the receiver in the direction of the segue's destinationViewController. For example, UINavigationController's implementation of this method will pop any necessary view controllers to reveal the subsequentVC.
      • updateFocusIfNeeded

        public void updateFocusIfNeeded()
        Description copied from interface: UIFocusEnvironment
        Forces focus to be updated immediately. If there is an environment that has requested a focus update via -setNeedsFocusUpdate, and the request was accepted, then focus will be updated to that environment or one of its preferred focus environments. NOTE: If you provide your own implementation, it must call `[[UIFocusSystem focusSystemForEnvironment:self] updateFocusIfNeeded];`.
        Specified by:
        updateFocusIfNeeded in interface UIFocusEnvironment
      • updateViewConstraints

        public void updateViewConstraints()
        Base implementation sends -updateConstraints to the view. When a view has a view controller, this message is sent to the view controller during the autolayout updateConstraints pass in lieu of sending updateConstraints directly to the view. You may override this method in a UIViewController subclass for updating custom constraints instead of subclassing your view and overriding -[UIView updateConstraints]. Overrides must call super or send -updateConstraints to the view.
      • view

        public UIView view()
        The getter first invokes [self loadView] if the view hasn't been set yet. Subclasses must call super if they override the setter or getter.
      • viewControllerForUnwindSegueActionFromViewControllerWithSender

        @Deprecated
        public UIViewController viewControllerForUnwindSegueActionFromViewControllerWithSender​(org.moe.natj.objc.SEL action,
                                                                                               UIViewController fromViewController,
                                                                                               java.lang.Object sender)
        Deprecated.
        Deprecated. Returns a direct child of the receiver that responds YES to -canPerformUnwindSegueAction:fromViewController:sender:, or self if no children respond YES but the receiver itself does. If this method has been overridden, UIViewController's implementation does not consult child view controllers at all, and skips straight to sending -canPerformUnwindSegueAction:... to self. Applications targeting iOS 9 or later should not override this method. Applications can instead override -allowedChildViewControllersForUnwindingFromSource: to guide UIKit’s search for a descendant view controller that returns YES from -canPerformUnwindSegueAction:fromViewController:sender:.
      • viewDidAppear

        public void viewDidAppear​(boolean animated)
        Called when the view has been fully transitioned onto the screen. Default does nothing
      • viewDidDisappear

        public void viewDidDisappear​(boolean animated)
        Called after the view was dismissed, covered or otherwise hidden. Default does nothing
      • viewDidLayoutSubviews

        public void viewDidLayoutSubviews()
        Called just after the view controller's view's layoutSubviews method is invoked. Subclasses can implement as necessary. The default is a nop.
      • viewDidLoad

        public void viewDidLoad()
        Called after the view has been loaded. For view controllers created in code, this is after -loadView. For view controllers unarchived from a nib, this is after the view is set.
      • viewDidUnload

        @Deprecated
        public void viewDidUnload()
        Deprecated.
        Called after the view controller's view is released and set to nil. For example, a memory warning which causes the view to be purged. Not invoked as a result of -dealloc.
      • viewIfLoaded

        public UIView viewIfLoaded()
        Returns the view controller's view if loaded, nil if not.
      • viewWillAppear

        public void viewWillAppear​(boolean animated)
        Called when the view is about to made visible. Default does nothing
      • viewWillDisappear

        public void viewWillDisappear​(boolean animated)
        Called when the view is dismissed, covered or otherwise hidden. Default does nothing
      • viewWillLayoutSubviews

        public void viewWillLayoutSubviews()
        Called just before the view controller's view's layoutSubviews method is invoked. Subclasses can implement as necessary. The default is a nop.
      • viewWillUnload

        @Deprecated
        public void viewWillUnload()
        Deprecated.
      • wantsFullScreenLayout

        @Deprecated
        public boolean wantsFullScreenLayout()
        Deprecated.
        Deprecated in 7_0, Replaced by the following:
      • willAnimateFirstHalfOfRotationToInterfaceOrientationDuration

        @Deprecated
        public void willAnimateFirstHalfOfRotationToInterfaceOrientationDuration​(long toInterfaceOrientation,
                                                                                 double duration)
        Deprecated.
      • willAnimateRotationToInterfaceOrientationDuration

        @Deprecated
        public void willAnimateRotationToInterfaceOrientationDuration​(long toInterfaceOrientation,
                                                                      double duration)
        Deprecated.
      • willAnimateSecondHalfOfRotationFromInterfaceOrientationDuration

        @Deprecated
        public void willAnimateSecondHalfOfRotationFromInterfaceOrientationDuration​(long fromInterfaceOrientation,
                                                                                    double duration)
        Deprecated.
        A this point, our view orientation is set to the new orientation.
      • willMoveToParentViewController

        public void willMoveToParentViewController​(UIViewController parent)
        These two methods are public for container subclasses to call when transitioning between child controllers. If they are overridden, the overrides should ensure to call the super. The parent argument in both of these methods is nil when a child is being removed from its parent; otherwise it is equal to the new parent view controller. addChildViewController: will call [child willMoveToParentViewController:self] before adding the child. However, it will not call didMoveToParentViewController:. It is expected that a container view controller subclass will make this call after a transition to the new child has completed or, in the case of no transition, immediately after the call to addChildViewController:. Similarly, removeFromParentViewController does not call [self willMoveToParentViewController:nil] before removing the child. This is also the responsibilty of the container subclass. Container subclasses will typically define a method that transitions to a new child by first calling addChildViewController:, then executing a transition which will add the new child's view into the view hierarchy of its parent, and finally will call didMoveToParentViewController:. Similarly, subclasses will typically define a method that removes a child in the reverse manner by first calling [child willMoveToParentViewController:nil].
      • willRotateToInterfaceOrientationDuration

        @Deprecated
        public void willRotateToInterfaceOrientationDuration​(long toInterfaceOrientation,
                                                             double duration)
        Deprecated.
        Notifies when rotation begins, reaches halfway point and ends.
      • additionalSafeAreaInsets

        public UIEdgeInsets additionalSafeAreaInsets()
        Custom container UIViewController subclasses can use this property to add to the overlay that UIViewController calculates for the safeAreaInsets for contained view controllers.
      • childViewControllerForHomeIndicatorAutoHidden

        public UIViewController childViewControllerForHomeIndicatorAutoHidden()
        Override to return a child view controller or nil. If non-nil, that view controller's home indicator auto-hiding will be used. If nil, self is used. Whenever the return value changes, -setNeedsHomeIndicatorAutoHiddenUpdate should be called.
      • childViewControllerForScreenEdgesDeferringSystemGestures

        public UIViewController childViewControllerForScreenEdgesDeferringSystemGestures()
        Override to return a child view controller or nil. If non-nil, that view controller's screen edges deferring system gestures will be used. If nil, self is used. Whenever the return value changes, -setNeedsScreenEdgesDeferringSystemGesturesUpdate should be called.
      • preferredScreenEdgesDeferringSystemGestures

        public long preferredScreenEdgesDeferringSystemGestures()
        Controls the application's preferred screen edges deferring system gestures when this view controller is shown. Default is UIRectEdgeNone.
      • prefersHomeIndicatorAutoHidden

        public boolean prefersHomeIndicatorAutoHidden()
        Controls the application's preferred home indicator auto-hiding when this view controller is shown.
      • setAdditionalSafeAreaInsets

        public void setAdditionalSafeAreaInsets​(UIEdgeInsets value)
        Custom container UIViewController subclasses can use this property to add to the overlay that UIViewController calculates for the safeAreaInsets for contained view controllers.
      • setNeedsUpdateOfHomeIndicatorAutoHidden

        public void setNeedsUpdateOfHomeIndicatorAutoHidden()
        This should be called whenever the return values for the view controller's home indicator auto-hiding have changed.
      • setNeedsUpdateOfScreenEdgesDeferringSystemGestures

        public void setNeedsUpdateOfScreenEdgesDeferringSystemGestures()
        This should be called whenever the return values for the view controller's screen edges deferring system gestures have changed.
      • setViewRespectsSystemMinimumLayoutMargins

        public void setViewRespectsSystemMinimumLayoutMargins​(boolean value)
        Default YES. The return value of the view's layoutMargins and directionalLayoutMargins properties will have values no smaller than the systemMinimumLayoutMargins. Set to NO for full customizability of the view's layoutMargins.
      • systemMinimumLayoutMargins

        public NSDirectionalEdgeInsets systemMinimumLayoutMargins()
        Minimum layoutMargins for the view determined by the view controller from context and hardware information. The view controller's view will respect these minimums unless viewRespectsSystemMinimumLayoutMargins (which defaults to YES) is set to NO.
      • viewLayoutMarginsDidChange

        public void viewLayoutMarginsDidChange()
      • viewRespectsSystemMinimumLayoutMargins

        public boolean viewRespectsSystemMinimumLayoutMargins()
        Default YES. The return value of the view's layoutMargins and directionalLayoutMargins properties will have values no smaller than the systemMinimumLayoutMargins. Set to NO for full customizability of the view's layoutMargins.
      • viewSafeAreaInsetsDidChange

        public void viewSafeAreaInsetsDidChange()
      • canPerformUnwindSegueActionFromViewControllerSender

        public boolean canPerformUnwindSegueActionFromViewControllerSender​(org.moe.natj.objc.SEL action,
                                                                           UIViewController fromViewController,
                                                                           java.lang.Object sender)
        View controllers will receive this message during segue unwinding. The default implementation returns the result of -respondsToSelector: - controllers can override this to perform any ancillary checks, if necessary.
      • isModalInPresentation

        public boolean isModalInPresentation()
        modalInPresentation is set on the view controller when you wish to force the presentation hosting the view controller into modal behavior. When this is active, the presentation will prevent interactive dismiss and ignore events outside of the presented view controller's bounds until this is set to NO.
      • overrideUserInterfaceStyle

        public long overrideUserInterfaceStyle()
        Defaults to UIUserInterfaceStyleUnspecified
      • parentFocusEnvironment

        public UIFocusEnvironment parentFocusEnvironment()
        Description copied from interface: UIFocusEnvironment
        The parent focus environment of this environment, or nil if no parent exists. NOTE: If you implement this method, you must return a non-nil value for parent focus environment, otherwise your focus environment will not participate in focus interactions.
        Specified by:
        parentFocusEnvironment in interface UIFocusEnvironment
      • performsActionsWhilePresentingModally

        public boolean performsActionsWhilePresentingModally()
        Determines whether the receiver continues to respond to actions while it is presenting a view controller modally. Defaults to YES. You can change the default return value by providing a value for UIViewControllerPerformsActionsWhilePresentingModally in your Info.plist file.
      • setModalInPresentation

        public void setModalInPresentation​(boolean value)
        modalInPresentation is set on the view controller when you wish to force the presentation hosting the view controller into modal behavior. When this is active, the presentation will prevent interactive dismiss and ignore events outside of the presented view controller's bounds until this is set to NO.
      • setOverrideUserInterfaceStyle

        public void setOverrideUserInterfaceStyle​(long value)
        Defaults to UIUserInterfaceStyleUnspecified
      • childViewControllerForPointerLock

        public UIViewController childViewControllerForPointerLock()
        Override to return a child view controller or nil. If non-nil, that view controller's preferred pointer lock value will be used. If nil, self is used. Whenever the return value changes, setNeedsUpdateOfPrefersPointerLocked() should be called.
      • focusGroupIdentifier

        public java.lang.String focusGroupIdentifier()
        Description copied from interface: UIFocusEnvironment
        The identifier of the focus group that this view belongs to. If this is nil, subviews inherit their superview's focus group.
        Specified by:
        focusGroupIdentifier in interface UIFocusEnvironment
      • prefersPointerLocked

        public boolean prefersPointerLocked()
        Whether the pointer should be locked to a given scene when this view controller is shown. The default is NO. This preference may or may not be honored. See UIPointerLockState.locked for the current pointer lock state as determined by the system.
      • setNeedsUpdateOfPrefersPointerLocked

        public void setNeedsUpdateOfPrefersPointerLocked()
        This should be called whenever the view controller's preferred pointer lock value has changed.