1
我有3個視圖(UIViewController)。我想像這樣做012d。但是這個鏈接項目使用的是客觀的C語言,但我需要迅速的語言。請問我可以獲得這個項目的資源。我正在嘗試使用Bridging-Header.h但不工作!swift中的3D立方體過渡視圖
我的代碼波紋管:
import UIKit
class SecondViewController: CubeController, CubeControllerDataSource, CubeControllerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func numberOfViewControllersInCubeController(cubeController: CubeController!) -> Int {
return 3
}
func cubeController(cubeController: CubeController!, viewControllerAtIndex index: Int) -> UIViewController! {
switch(index % 3){
case 0:
return AViewController(nibName: "MyViewController", bundle: nil)
case 1:
return BViewController()
case 2:
return CViewController()
default:
return nil
}
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}
偉大的工作@Ashish Kakkad –
謝謝你回覆@Ashis Kakkad兄弟...兄弟我正在嘗試這個代碼它工作正常。你能告訴我PLZ - 我想特定立方體3視圖不想rootviewcontroller。你能幫我嗎? –