Ios 通过swift查看三维立方体动画

Ios 通过swift查看三维立方体动画,ios,swift,cube,Ios,Swift,Cube,我想使用swift为3或4视图(UIViewController)创建3d立方体。我关注这个网站。 我的密码是贝娄。当我只选择3个视图时,我想要三维立方体视图。但是我的项目都是三维视图。如何停止所有页面的三维立方体 import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate, CubeControllerDataSource { var window: UIWindow? fu

我想使用swift为3或4视图(UIViewController)创建3d立方体。我关注这个网站。 我的密码是贝娄。当我只选择3个视图时,我想要三维立方体视图。但是我的项目都是三维视图。如何停止所有页面的三维立方体

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, CubeControllerDataSource {

var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

    self.window = UIWindow.init(frame: UIScreen.mainScreen().bounds)
    let cubeVC : CubeController = CubeController()
    cubeVC.dataSource = self
    cubeVC.wrapEnabled = true
    self.window?.rootViewController = cubeVC
    self.window?.makeKeyAndVisible()

    // Override point for customization after application launch.
    return true
}

func numberOfViewControllersInCubeController(cubeController: CubeController!) -> Int {
    return 3
}

func cubeController(cubeController: CubeController!, viewControllerAtIndex index: Int) -> UIViewController! {

    let storyboard = UIStoryboard(name: "Main", bundle: nil)

    switch (index % 3){
        case 0:
            return storyboard.instantiateViewControllerWithIdentifier("VC1")
        case 1:
            return storyboard.instantiateViewControllerWithIdentifier("VC2")
        case 2:
            return storyboard.instantiateViewControllerWithIdentifier("VC3")
        default:
            return nil
    }
}