IOS Crazy Basics page jumps between pages

Source: Internet
Author: User

Two kinds of commonly used navigation, a direct jump

The first kind of direct jump idea is basically a new destination page, and then set the next page jump animation can also do a bit of data initialization of the destination page:

Valueinputview *valueview = [[valueinputview alloc] initwithnibname:@ "Valueinputview" bundle : [nsbundle Mainbundle]];

Valueview. delegate = self ;

[valueview setmodaltransitionstyle: uimodaltransitionstylecoververtical];

[Selfpresentmodalviewcontroller: Valueview animated:YES];

Return

[Self dismissmodalviewcontrolleranimated:yes];

Second:

Using Uinavigationcontroller, call Pushviewcontroller, to jump, this use of the stack and the way out of the stack controller management. Call the Popviewcontrolleranimated method to return

Pickimageviewcontroller *ickimageviewcontroller = [[Pickimageviewcontroller alloc] init];

[Self.navigationcontroller Pushviewcontroller:ickimageviewcontroller animated:true];

Four styles of Setmodaltransitionstyle

Uimodaltransitionstylecoververtical slide into the uimodaltransitionstylefliphorizontal from the bottom, Flip horizontally into uimodaltransitionstylecrossdissolve, cross dissolve uimodaltransitionstylepartialcurl, flip page

Scene switching

There are 5 different styles (style) for switching between scenes:
Modal (modal)-transitions to another scene to complete a task. When the task is completed, the scene is closed and returned to the original scene.
Push (press in)-Creates a chain of scenes in which the user can move forward and backward. Used to navigate the view controller.
Replace (replacement, ipad only)-replaces the current scene for some ipad-specific view controllers.
Popover (pop-up box for ipad only)-a popup with arrows.
Custome (Custom)--Customize transitions between scenes by compiling.

A transition type (Transition) is an animation that plays when you switch from one scene to another. There are 4 options:
Cover Vertical-The new scene moves from the bottom up, gradually covering the old scene.
Flip Horizontal-The view is flipped horizontally to show a new scene on the back.
Cross dissolve-old scenes fade out and new scenes fade in.
Partial Curl-The old scene opens like a page, showing the new scene below.

In the ipad app, there is also an extra presentation attribute that determines how the modal view is displayed on the screen. There are 4 kinds of display styles:
Form Sheet (form)-Adjusts the scene to be smaller than the screen (regardless of orientation) and displays the original scene behind the current scene, which is almost equivalent to being displayed in an ipad window.
Page Sheet-Adjusts the scene size so that it appears in portrait format.
Full screen-Adjusts the scene size so that it covers the entire screen.
Current context--Displays the scene in the same way as the original scene.

IOS Crazy Basics page jumps between pages

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.