CTLCubeContainerViewController 1.2

CTLCubeContainerViewController 1.2

CanThaiLinh 维护。



  • CanThaiLinh

CTLCubeContainerViewController

CI Status Version License Platform

示例

要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install

要求

Swift 5

安装

CTLCubeContainerViewController 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

pod 'CTLCubeContainerViewController'

在您的 viewcontroller 中导入此库

import CubeContainer

##用法

初始化 CTLCubeContainerViewController

let cubeContainViewController = CTLCubeContainerViewController(viewControllers: listVC)

修改接口

// 
//true : pan by UIPanGestureRecognizer. false : UIScreenEdgePanGestureRecognizer
    public var  panWithoutScreen = true
    
    public var isHiddenNavigationBar = true

添加下一页和上一页的按钮

// set isHiddenNavigationBar = false before
cubeContainViewController.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .rewind, target: cubeContainViewController, action: #selector(CTLCubeContainerViewController.navigateToPreviousViewController))
        cubeContainViewController.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .fastForward, target: cubeContainViewController, action: #selector(CTLCubeContainerViewController.navigateToNextViewController))
        

数据源

当 '未来视图控制器' 栈中没有更多视图控制器时,调用此方法以获取下一个视图控制器。如果不需要,则返回 nil。

func cubeContainerViewController(_ cubeContainerViewController: CTLCubeContainerViewController, viewControllerAfter viewController: UIViewController) -> UIViewController? {
        return  nil
}

作者

Linh, [email protected]

许可

CTLCubeContainerViewController遵循MIT许可。更多信息请参阅LICENSE文件。