"Beginning IOS 7 Development" proficient in iOS7 development "" Multiview applications

Source: Internet
Author: User

One, the typical multi-view application


1, TAB BAR.







2,NAVIGATION BAR






3, Tab+navigation





4. TOOL BAR




Second, create a new multi-view app


1. App Effect Demo




2. Project Structure





bidswitchviewcontroller.m//View switcher////Created by Jason on 14-7-17.//Copyright (c) 2014 Jason. All rights reserved.//#import "BIDSwitchViewController.h" @interface Bidswitchviewcontroller () @end @implementation bidswitchviewcontroller-(ID) initwithnibname: (NSString *) Nibnameornil Bundle: (NSBundle *) nibbundleornil{self = [    Super Initwithnibname:nibnameornil Bundle:nibbundleornil]; if (self) {//Custom initialization} return to self;}    -(void) viewdidload{[Super Viewdidload];    Do any additional setup after loading the view.    Self.blueviewcontroller = [Self.storyboard instantiateviewcontrollerwithidentifier:@ "Blue"]; [Self.view InsertSubview:self.blueViewController.view atindex:0];}    -(void) didreceivememorywarning{//Reclaim two sub-views [Super didreceivememorywarning];    Dispose of any resources the can be recreated.    if (!self.blueviewcontroller.view.superview) {self.blueviewcontroller = nil; }else{Self.yellowviewcontroller = nil; }}/* #pragma mark-navigation//in a storyboard-based application, you'll often want to do a little preparation before n avigation-(void) Prepareforsegue: (Uistoryboardsegue *) Segue Sender: (ID) sender{//Get The new view controller using [SE    Gue Destinationviewcontroller]. Pass the selected object to the new view Controller.}    *///toggle Logic, toggle Animation-(ibaction) Switchviews: (ID) sender{[UIView beginanimations:@ "View Flip" context:null];    [UIView setanimationduration:0.4];    [UIView Setanimationcurve:uiviewanimationcurveeaseinout]; if (!self.yellowviewcontroller.view.superview) {if (!self.yellowviewcontroller) {Self.yellowviewcontro        Ller = [Self.storyboard instantiateviewcontrollerwithidentifier:@ "Yellow"]; } [UIView Setanimationtransition:uiviewanimationtransitionflipfromright Forview:sel        F.view Cache:yes];       [Self.blueViewController.view Removefromsuperview]; [Self.view InsertSubview:self.yellowViewController.view atindex:0]; }else{if (!self.blueviewcontroller) {self.blueviewcontroller = [Self.storyboard Instantiateviewcontrol            lerwithidentifier:@ "Blue"]; } [UIView Setanimationtransition:uiviewanimationtransitionflipfromleft forview:self.v        Iew Cache:yes];        [Self.yellowViewController.view Removefromsuperview];    [Self.view InsertSubview:self.blueViewController.view atindex:0]; } [UIView commitanimations];} @end


3, Code download:

https://github.com/Simba-Hu/View-Switcher.git

[email protected]: Simba-hu/view-switcher.git



Third, summary

View Controller

Storyboard

Uiviewcontroller

Empty Application

Toolbar

The Object Attributes Inspector

Control-drag

APP Delegate

Show Quick Help Inspector

Lazy Loading ,

Superview

Content views

Main.storyboard

Interface Builder

The Object library

Scene

Editor- align- horizontal Center incontainer

editor- align- verticalcenter in Container

The Connections Inspector

Touch up Inside Event

File ' Sowner icon

Background

The Attributes Inspector

The Identity Inspector

The Color picker

Constraints

Transition

"Beginning IOS 7 Development" proficient in iOS7 development "" Multiview applications

Related Article

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.