测试经过测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布日期最后发布 | 2017年11月 |
SPM支持SPM | ✗ |
由 Oscar Apeland、Oscar Apeland 维护。
要测试项目,请克隆此仓库并运行SwipeableViewController.xcodeproj。
SwipeableViewController可通过CocoaPods获取。要安装它,只需在Podfile中添加以下行
pod 'SwipeableViewController'
// Make an instance of SwipeableNavigationController
let navigationController = SwipeableNavigationController(navigationBarClass: SwipeableNavigationBar.self, toolbarClass: nil)
// Make an instance of SwipeableViewController
let viewController = SwipeableViewController()
// Inject data
viewController.swipeableItems = [SwipeableItem(title: "View 1", viewController: ExampleViewController()),
SwipeableItem(title: "View 2", viewController: ExampleViewController()),
SwipeableItem(title: "View 3", viewController: ExampleViewController())]
viewController.selectedIndex = 1
// Set the view to the navigation controller (if you want the SwipeableViewController at the root of your navigationController)
navigationController.setViewControllers([viewController], animated: false)
您就可以开始使用了!
Oscar Apeland,[email protected]
SwipeableViewController受MIT许可协议保护。请参阅LICENSE文件以获取更多信息。