public class UIViewController extends UIResponder implements UIAppearanceContainer
Constructor and Description |
---|
UIViewController()
Constructs a default view controller.
|
UIViewController(String nibName,
NSBundle bundlename)
Constructs a view controller according to the description of the nib file
that is located in the specified bundle.
|
Modifier and Type | Method and Description |
---|---|
void |
addChildViewController(UIViewController childController) |
UIEdgeInsets |
additionalSafeAreaInsets() |
List<UIViewController> |
allowedChildViewControllersForUnwindingFromSource(UIStoryboardUnwindSegueSource source) |
static void |
attemptRotationToDeviceOrientation()
Rotates all the views to comply with the rotation of the device, if this
is possible.
|
boolean |
automaticallyAdjustsScrollViewInsets()
Returns a Boolean that shows whether automatic adjustment of scroll views
is enabled.
|
void |
beginAppearanceTransition(boolean isAppearing,
boolean animated) |
UILayoutSupport |
bottomLayoutGuide() |
UIViewController |
childViewControllerContainingSegueSource(UIStoryboardUnwindSegueSource source) |
UIViewController |
childViewControllerForStatusBarHidden()
The view controller who is responsible of the status bar visibility
|
UIViewController |
childViewControllerForStatusBarStyle()
The view controller who is responsible of the status bar style
|
List<UIViewController> |
childViewControllers() |
CGSize |
contentSizeForViewInPopover()
Deprecated.
|
boolean |
definesPresentationContext() |
void |
didReceiveMemoryWarning()
Called when a memory warning arises in order to notify the view
controller.
|
void |
didRotateFromInterfaceOrientation(int UIInterfaceOrientation)
Deprecated.
|
boolean |
disablesAutomaticKeyboardDismissal() |
void |
dismissModalViewControllerAnimated(boolean animated)
Deprecated.
|
void |
dismissViewControllerAnimated(boolean flag,
Runnable completion)
Dismisses the view controller for this view controller.
|
int |
edgesForExtendedLayout()
Returns the edges that should be extended to cover the whole screen.
|
UIBarButtonItem |
editButtonItem()
Returns the button item of the bar that switches between Edit and Done
states.
|
void |
endAppearanceTransition() |
NSExtensionContext |
extensionContext() |
boolean |
hidesBottomBarWhenPushed()
Returns a Boolean that shows whether toolbar at the bottom of the screen
is visible when the view controller is pushed on to the navigation
controller.
|
int |
interfaceOrientation()
Deprecated.
|
boolean |
isEditing()
Returns a Boolean that shows whether the content of the view is currently
allowed to be edit by the user.
|
boolean |
isModalInPopover()
The default value of this field is false.
|
boolean |
isViewLoaded()
Returns a Boolean that shows whether the view is loaded into memory.
|
void |
loadView()
Creates a view for this view controller.
|
void |
loadViewIfNeeded()
Loads the controller's view, if it is not loaded yet
|
int |
modalPresentationStyle()
Returns the presentation style.
|
int |
modalTransitionStyle()
Returns the transition style.
|
UINavigationController |
navigationController()
Returns the nearest ancestor in hierarchy, that is a navigation
controller.
|
UINavigationItem |
navigationItem()
Returns the navigation item that represents this view controller in its
parent navigation bar.
|
UIResponder |
nextResponder()
Returns the next responder of the response chain.
|
String |
nibName()
Returns the name of the nib file that is used.
|
UIViewController |
parentViewController()
Returns the parent view of this view controller.
|
void |
performSegueWithIdentifier(String identifier,
Object sender) |
int |
preferredInterfaceOrientationForPresentation()
Returns the interface orientation of this view controller.
|
int |
preferredStatusBarStyle()
Retrieve the preferred status bar style for the view controller
|
boolean |
prefersStatusBarHidden()
Retrieve whether the status bar is preferred to be hidden or not for this view controller
|
void |
prepareForSegue(UIStoryboardSegue segue,
Object sender) |
UIViewController |
presentedViewController() |
UIViewController |
presentingViewController() |
void |
presentModalViewController(UIViewController modalViewController,
boolean animated)
Deprecated.
|
void |
presentViewController(UIViewController viewControllerToPresent,
boolean flag,
Runnable completion)
Presents the view that is managed by the specified modal view controller
using animation or not according to the parameter.
|
boolean |
providesPresentationContextTransitionStyle() |
void |
removeFromParentViewController() |
String |
restorationIdentifier() |
UIView |
rotatingFooterView()
Deprecated.
|
UIView |
rotatingHeaderView()
Deprecated.
|
void |
setAdditionalSafeAreaInsets(UIEdgeInsets additionalSafeAreaInsets) |
void |
setAutomaticallyAdjustsScrollViewInsets(boolean automaticallyAdjustsScrollViewInsets)
Sets a Boolean that defines whether automatic adjustment of scroll views
is enabled.
|
void |
setContentSizeForViewInPopover(CGSize contentSizeForViewInPopover)
Deprecated.
|
void |
setDefinesPresentationContext(boolean definesPresentationContext) |
void |
setEdgesForExtendedLayout(int UIRectEdge)
Sets the edges that should be extended to cover the whole screen.
|
void |
setEditing(boolean editing)
Sets a Boolean that define whether the content of the view is allowed to
be currently editable by the user.
|
void |
setEditing(boolean editing,
boolean animated)
Sets values that define whether the content of the content is allowed to
be currently editable by the user.
|
void |
setHidesBottomBarWhenPushed(boolean hidesBottomBarWhenPushed)
Sets a Boolean that defines whether toolbar at the bottom of the screen
is visible when the view controller is pushed on to the navigation
controller.
|
void |
setModalInPopover(boolean modalInPopover)
The default value of this field is false.
|
void |
setModalPresentationStyle(int UIModalPresentationStyle)
Sets the presentation style.
|
void |
setModalTransitionStyle(int UIModalTransitionStyle)
Sets the transition style.
|
void |
setNeedsStatusBarAppearanceUpdate() |
void |
setProvidesPresentationContextTransitionStyle(boolean providesPresentationContextTransitionStyle) |
void |
setRestorationIdentifier(String restorationIdentifier) |
void |
setTabBarItem(UITabBarItem tabBarItem)
Sets tab bar item for this view controller when added to a tab bar
controller.
|
void |
setTitle(String title)
Sets the title for the view for this view controller.
|
void |
setToolbarItems(List<UIBarButtonItem> items)
Sets toolbar items list for this view controller.
|
void |
setToolbarItems(List<UIBarButtonItem> items,
boolean animated)
Sets the toolbar items list to be displayed with the view controller
using animation or not.
|
void |
setView(UIView view)
Sets the view of this view controller.
|
void |
setWantsFullScreenLayout(boolean wantsFullScreenLayout)
Deprecated.
|
boolean |
shouldAutomaticallyForwardAppearanceMethods() |
boolean |
shouldAutorotate()
Returns a Boolean that shows whether the autorotation of the view
controller's is enabled.
|
boolean |
shouldAutorotateToInterfaceOrientation(int UIInterfaceOrientation)
Deprecated.
|
boolean |
shouldPerformSegueWithIdentifier(String identifier,
Object sender) |
void |
showDetailViewController(UIViewController vc,
Object sender) |
void |
showViewController(UIViewController vc,
Object sender)
Shows a view Controller
|
UISplitViewController |
splitViewController()
Returns the nearest ancestor in the hierarchy that is a split view
controller.
|
UIStoryboard |
storyboard() |
int |
supportedInterfaceOrientations()
Returns the supported interface orientations for this view controller.
|
UITabBarController |
tabBarController()
Returns the nearest ancestor in the hierarchy that is a Tab bar
controller.
|
UITabBarItem |
tabBarItem()
Returns the tab bar item for this view controller when added to a tab bar
controller.
|
String |
title()
Returns the title of the view for this view controller.
|
List<UIBarButtonItem> |
toolbarItems()
Returns the toolbar items list of this view controller.
|
UILayoutSupport |
topLayoutGuide() |
void |
transitionFromViewController(UIViewController fromViewController,
UIViewController toViewController,
double duration,
int options,
Runnable animations,
org.robovm.objc.block.VoidBlock1<Boolean> completion) |
UIView |
view()
Returns the view of this view controller.
|
void |
viewDidAppear(boolean animated)
Called after the view was added to the view controller's hierarchy with
animation or not according to the Boolean parameter.
|
void |
viewDidDisappear(boolean animated)
Called when the view was removed from the view controller's hierarchy
with animation or not according to the Boolean parameter.
|
void |
viewDidLayoutSubviews()
Called after the controller layout its subviews.
|
void |
viewDidLoad()
Called after the view is loaded into memory.
|
void |
viewDidUnload()
Deprecated.
|
UIView |
viewIfLoaded()
Return controllers view if it is already loaded.
|
void |
viewSafeAreaInsetsDidChange() |
void |
viewWillAppear(boolean animated)
Called before the view is added to the view controller's hierarchy with
animation or not according to the Boolean parameter.
|
void |
viewWillDisappear(boolean animated)
Called when the view is about to be removed from the view controller's
hierarchy with animation or not according to the Boolean parameter.
|
void |
viewWillLayoutSubviews()
Called when the controller will layout its subviews.
|
boolean |
wantsFullScreenLayout()
Deprecated.
|
void |
willAnimateRotationToInterfaceOrientation(int UIInterfaceOrientation,
double duration)
Deprecated.
|
void |
willRotateToInterfaceOrientation(int UIInterfaceOrientation,
double duration)
Deprecated.
|
becomeFirstResponder, isFirstResponder, resignFirstResponder, touchesBegan, touchesCancelled, touchesEnded, touchesMoved
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
public UIViewController()
public UIViewController(String nibName, NSBundle bundlename)
nibName
- The name of the nib file.If NULL then it uses no nib file.bundlename
- The bundle in which the nib file is located.public static void attemptRotationToDeviceOrientation()
public UIStoryboard storyboard()
public boolean shouldPerformSegueWithIdentifier(String identifier, Object sender)
public void prepareForSegue(UIStoryboardSegue segue, Object sender)
public List<UIViewController> allowedChildViewControllersForUnwindingFromSource(UIStoryboardUnwindSegueSource source)
public UIViewController childViewControllerContainingSegueSource(UIStoryboardUnwindSegueSource source)
public UIResponder nextResponder()
UIResponder
nextResponder
in class UIResponder
public boolean isViewLoaded()
public UIView viewIfLoaded()
@Deprecated public UIView rotatingHeaderView()
@Deprecated public UIView rotatingFooterView()
public int modalPresentationStyle()
UIModalPresentationStyle
public void setModalPresentationStyle(int UIModalPresentationStyle)
UIModalPresentationStyle
- The presentation style of modally
presented view controllers.UIModalPresentationStyle
public int modalTransitionStyle()
UIModalTransitionStyle
public void setModalTransitionStyle(int UIModalTransitionStyle)
UIModalTransitionStyle
- The transition style.UIModalTransitionStyle
public boolean isModalInPopover()
public void setModalInPopover(boolean modalInPopover)
modalInPopover
- Define if interactions are enabled or if the pop-over is modalpublic UIView view()
public void loadViewIfNeeded()
public void setView(UIView view)
view
- The view of this view controller.public String title()
public void setTitle(String title)
title
- The title of the view for this view controller.public UINavigationItem navigationItem()
@Deprecated public boolean wantsFullScreenLayout()
@Deprecated public void setWantsFullScreenLayout(boolean wantsFullScreenLayout)
wantsFullScreenLayout
- A Boolean that shows whether the view should
cover the status bar.public UIBarButtonItem editButtonItem()
public boolean isEditing()
public void setEditing(boolean editing)
editing
- A Boolean that indicates whether the content of the view
is currently allowed to be edit by the user.public void setEditing(boolean editing, boolean animated)
editing
- If TRUE the view is editable.animated
- If TRUE the change is animated.public boolean hidesBottomBarWhenPushed()
public void setHidesBottomBarWhenPushed(boolean hidesBottomBarWhenPushed)
hidesBottomBarWhenPushed
- A Boolean that defines whether toolbar at
the bottom of the screen is visible when the view controller is pushed on
to the navigation controller.public UITabBarItem tabBarItem()
public void setTabBarItem(UITabBarItem tabBarItem)
tabBarItem
- The tab bar item for this view controller when added to
a tab bar controller.public List<UIBarButtonItem> toolbarItems()
public void setToolbarItems(List<UIBarButtonItem> items)
items
- The toolbar items list of this view controller.public void setToolbarItems(List<UIBarButtonItem> items, boolean animated)
items
- The toolbar items to be displayed.animated
- If set TRUE the change is animated.@Deprecated public int interfaceOrientation()
UIInterfaceOrientation
public boolean disablesAutomaticKeyboardDismissal()
public boolean providesPresentationContextTransitionStyle()
public void setProvidesPresentationContextTransitionStyle(boolean providesPresentationContextTransitionStyle)
public boolean definesPresentationContext()
public void setDefinesPresentationContext(boolean definesPresentationContext)
public void showViewController(UIViewController vc, Object sender)
vc
- View Controller to showsender
- Object that requested the View Controllerpublic void showDetailViewController(UIViewController vc, Object sender)
public void presentViewController(UIViewController viewControllerToPresent, boolean flag, Runnable completion)
viewControllerToPresent
- The view controller to be presentedflag
- if true the transition is animatedcompletion
- block that runs after the presentation ends. can be
NULL@Deprecated public void presentModalViewController(UIViewController modalViewController, boolean animated)
modalViewController
- The view controller of the modal view.animated
- If TRUE the presentation is animated.public void dismissViewControllerAnimated(boolean flag, Runnable completion)
flag
- If TRUE the change is animated.completion
- block that runs after the dismissal ends. can be NULL@Deprecated public void dismissModalViewControllerAnimated(boolean animated)
animated
- If TRUE the change is animated.@Deprecated public CGSize contentSizeForViewInPopover()
@Deprecated public void setContentSizeForViewInPopover(CGSize contentSizeForViewInPopover)
contentSizeForViewInPopover
- The size of the pop over view of this
view controller.public int edgesForExtendedLayout()
UIRectEdge
public void setEdgesForExtendedLayout(int UIRectEdge)
UIRectEdge
- The edges that should be extended to cover the whole
screen.public boolean automaticallyAdjustsScrollViewInsets()
public void setAutomaticallyAdjustsScrollViewInsets(boolean automaticallyAdjustsScrollViewInsets)
automaticallyAdjustsScrollViewInsets
- A Boolean that defines
whether automatic adjustment of scroll views is enabled.public String nibName()
public void loadView()
public void viewDidLoad()
@Deprecated public void viewDidUnload()
public void viewWillAppear(boolean animated)
animated
- If set TRUE the view is added with animation.public void viewDidAppear(boolean animated)
animated
- If set TRUE the view was added with animation.public void viewWillDisappear(boolean animated)
animated
- If set TRUE the view is removed with animation.public void viewDidDisappear(boolean animated)
animated
- If set TRUE the view was removed with animation.public void viewWillLayoutSubviews()
public void viewDidLayoutSubviews()
public boolean shouldAutorotate()
@Deprecated public boolean shouldAutorotateToInterfaceOrientation(int UIInterfaceOrientation)
UIInterfaceOrientation
- The orientation that is attempted to be
applied. The orientation of the app's user interface after the rotation.UIInterfaceOrientation
public int supportedInterfaceOrientations()
UIInterfaceOrientationMask
public int preferredInterfaceOrientationForPresentation()
@Deprecated public void willRotateToInterfaceOrientation(int UIInterfaceOrientation, double duration)
UIInterfaceOrientation
- The new orientation of the user interface.duration
- The duration of the rotation expressed in seconds.UIInterfaceOrientation
@Deprecated public void willAnimateRotationToInterfaceOrientation(int UIInterfaceOrientation, double duration)
UIInterfaceOrientation
- The new orientation of the user interface.duration
- The duration of the rotation expressed in seconds.UIInterfaceOrientation
@Deprecated public void didRotateFromInterfaceOrientation(int UIInterfaceOrientation)
UIInterfaceOrientation
- The previous orientation of the user
interface.UIInterfaceOrientation
public void didReceiveMemoryWarning()
public NSExtensionContext extensionContext()
public UIEdgeInsets additionalSafeAreaInsets()
public void setAdditionalSafeAreaInsets(UIEdgeInsets additionalSafeAreaInsets)
public void viewSafeAreaInsetsDidChange()
public UILayoutSupport topLayoutGuide()
public UILayoutSupport bottomLayoutGuide()
public List<UIViewController> childViewControllers()
public void addChildViewController(UIViewController childController)
public void removeFromParentViewController()
public void transitionFromViewController(UIViewController fromViewController, UIViewController toViewController, double duration, int options, Runnable animations, org.robovm.objc.block.VoidBlock1<Boolean> completion)
public boolean shouldAutomaticallyForwardAppearanceMethods()
public void beginAppearanceTransition(boolean isAppearing, boolean animated)
public void endAppearanceTransition()
public UIViewController presentingViewController()
public UIViewController presentedViewController()
public UIViewController parentViewController()
public UINavigationController navigationController()
public UISplitViewController splitViewController()
public UITabBarController tabBarController()
public int preferredStatusBarStyle()
UIStatusBarStyle
public UIViewController childViewControllerForStatusBarStyle()
preferredStatusBarStyle()
public boolean prefersStatusBarHidden()
public UIViewController childViewControllerForStatusBarHidden()
public void setNeedsStatusBarAppearanceUpdate()
public String restorationIdentifier()
public void setRestorationIdentifier(String restorationIdentifier)
Copyright © 2020. All rights reserved.