在Android中:Intent對象,通知鬆散耦合的Activity等組件html
在IOS中:Segue對象鏈接視圖ide
1 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="99" translatesAutoresizingMaskIntoConstraints="NO"> 2 <rect key="frame" x="20" y="357" width="560" height="30"/> 3 <state key="normal" title="Call History"> 4 <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> 5 </state> 6 <connections> 7 <segue id="402" destination="101" kind="show"/> 8 </connections> 9 </button>
Segue鏈接視圖,只能循序漸進的導航到指定的視圖,若是須要控制導航方向。咱們須要代碼控制:post
Segue做爲視圖之間的橋樑,若是沒有這個特定的橋樑,那麼咱們能夠控制導航的方向-經過代碼ui
經過註冊在畫板上的 Storyboard ID 到特定的視圖,咱們能夠打開視圖:this
1 CallHistoryButton.TouchUpInside += (object sender, EventArgs e) =>{ 2 // Launches a new instance of CallHistoryController 3 CallHistoryController callHistory = this.Storyboard.InstantiateViewController ("CallHistoryController") as CallHistoryController;//從畫板中加載對應的控制器級聯對象 4 if (callHistory != null) { 5 callHistory.PhoneNumbers = PhoneNumbers; 6 this.NavigationController.PushViewController (callHistory, true); 7 } 8 };