This is a question, what is modal? Simply put, you are traveling, suddenly the boss to call you to solve technical problems, very urgent. So you have to take care of the phone before you can travel.
Or you want to watch the video, the website pops up the following window, you must install the software to continue to see ...
So modal, is a state, you have to solve this state before you can continue.
Realizing modal
Storyboardid is defined as follows:
An identifier string, 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 are not a property of the view controller object itself and are used only by the storyboard file to locate T He view Controller.
:
translation: This flag string is the unique identifier of the storyboard that is trying to control the controller. You can set this identifier in the storyboard, which is not a property of the view controller, but is only used when reading the view controller in the story version.
Thatis, Storyboardid is used to get and build Viewcontroller objects in storyboard
Get Storyboard Object
Gets the Storyboard object uistoryboard *mainstoryboard=[uistoryboard storyboardwithname:@ "Main" bundle:nil]; Create Uiviewcontroller objects with storyboard ID uiviewcontroller* Model=[mainstoryboard instantiateviewcontrollerwithidentifier:@ "Modelviewcontroller"];
First function: Storyboardwithname:bundle: try a specific string, create and return the Storyboard object: The returned object is Main.storyboard
Second function: Create an instance of Viewcontroller with the specified identifier, identified as: Storyboardid, set on the property page
Convert animation type
Next, set the conversion animation type: (transition: Excessive)
Excessive animation Model.modaltransitionstyle=uimodaltransitionstylepartialcurl;
There are four types of options available:
typedef ns_enum (Nsinteger, Uimodaltransitionstyle) { uimodaltransitionstylecoververtical = 0, Uimodaltransitionstylefliphorizontal, Uimodaltransitionstylecrossdissolve, Uimodaltransitionstylepartialcurl Ns_enum_available_ios (3_2),};
Let's explain this article by clause:
1 cover: including, covering Vertical: Vertical translation comes up--vertical overlay
2 Flip: Throw, pop horizontal: Horizontal translation comes up-horizontal throw, (this good bold ... )
3 Cross: Crossover dissolve: Dissolve translates to--cross-dissolve (about vaguely revealing, gradually apparent)
4 Partial: Local curl: Curly translate Chinese--Lift a corner (your own brain)
Open and close the modal