Class: UIStoryboard

Inherits:
NSObject show all

Overview

A UIStoryboard object encapsulates the view controller graph stored in an Interface Builder storyboard resource file. This view controller graph represents the view controllers for all or part of your application’s user interface. Normally, view controllers in a storyboard are instantiated and created automatically in response to actions defined within the storyboard itself. However, you can use a storyboard object to instantiate the initial view controller in a storyboard file or instantiate other view controllers that you want to present programmatically.

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from NSObject

#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version

Constructor Details

This class inherits a constructor from NSObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class NSObject

Class Method Details

+ (UIStoryboard) storyboardWithName(name, bundle:storyboardBundleOrNil)

Creates and returns a storyboard object for the specified storyboard resource file. Use this method to retrieve the storyboard object containing the view controller graph you want to access. All of the resources associated with the storyboard must be in the bundle indicated by the storyboardBundleOrNil parameter.

Parameters:

  • name (String)

    The name of the storyboard resource file without the filename extension. This method raises an exception if this parameter is nil.

  • storyboardBundleOrNil (NSBundle)

    The bundle containing the storyboard file and its related resources. If you specify nil, this method looks in the main bundle of the current application.

Returns:

  • (UIStoryboard)

    A storyboard object for the specified file or nil if no such object exists.

Instance Method Details

- (Object) instantiateInitialViewController

Instantiates and returns the initial view controller in the view controller graph. Every storyboard file must have an initial view controller that represents the starting point for the corresponding user interface. For an application’s storyboard, this is usually the first screen presented to the user at launch time. You designate the initial view controller in Interface Builder when configuring the storyboard file.Typically, you use this method only when transitioning to the initial view controller in a different storyboard file. For your application’s main storyboard file—that is, the storyboard file specified in the application’s Info.plist file using the UIMainStoryboardFile key—the initial view controller is loaded and presented automatically. This method creates a new instance of the initial view controller each time you call it.

Returns:

  • (Object)

    The initial view controller in the storyboard.

- (Object) instantiateViewControllerWithIdentifier(identifier)

Instantiates and returns the view controller with the specified identifier. You use this method to create view controller objects that you want to manipulate and present programmatically in your application. Before you can use this method to retrieve a view controller, you must explicitly tag it with an appropriate identifier string in Interface Builder. This method creates a new instance of the specified view controller each time you call it.

Parameters:

  • identifier (String)

    An identifier string that uniquely identifies the view controller in the storyboard file. You set the identifier for a given view controller in Interface Builder when configuring the storyboard file. This identifier is not a property of the view controller object itself and is only used by the storyboard file to locate the view controller.If the specified identifier does not exist (or is nil) in the storyboard file, this method raises an exception.

Returns:

  • (Object)

    The view controller corresponding to the specified identifier string or nil if no view controller is associated with the string.