JGTabBarView 1.0.3

JGTabBarView 1.0.3

JungGate 维护。



  • 作者
  • JungGate

swfit

JGTabBarView

  • 通过简单的方法,可以快速构建标签页面
  • 使用滑动手势可以在标签之间进行切换
  • 可以在 Interface Builder 中插入使用

演示

1 2 3 4

5

// create UIViewController (with JGTabBar protocol)
class TabViewController: UIViewController, JGTabBar

// XIB View variable
@IBOutlet weak var tabBarView: JGTabBarView!

override func viewDidLoad() {
    super.viewDidLoad()

    var views: [TabViewController] = []
    (1...4).forEach { (index) in
        let tabViewController = TabViewController(nibName: "TabViewController", bundle: nil)
        // Tab Button Title.
        tabViewController.tabTitle = "Button\(index)"
        views.append(tabViewController)
    }

    // set tabs
    tabBarView.tabs = views 
}