转载

[iOS] 一款实用的分页视图及滚动选项卡组件

TabPageViewController

Description

[iOS] 一款实用的分页视图及滚动选项卡组件

TabPageViewController is paging view controller and scroll tab view.

Screenshot

Infinity Mode

[iOS] 一款实用的分页视图及滚动选项卡组件

Limited Mode

[iOS] 一款实用的分页视图及滚动选项卡组件

Customization

Use TabPageOption

  • fontSize for tab item

fontSize: CGFloat

  • currentColor for current tab item

currentColor: UIColor

  • defaultColor for tab item

defaultColor: UIColor

  • tabBarAlpha for tab view

tabBarAlpha: CGFloat

  • tabHeight for tab view

tabHeight: CGFloat

  • tabMargin for tab item

tabMargin: CGFloat

  • tabBackgroundColor for tab view

tabBackgroundColor: UIColor

  • pageBackgoundColor for tab page viewcontroller

pageBackgoundColor: UIColor

Usage

import TabPageViewController to use TabPageViewController in your file.

Example

let tabPageViewController = TabPageViewController.create() let vc1 = UIViewController() let vc2 = UIViewController()  tabPageViewController.tabItems = [(vc1, "First"), (vc2, "Second")]  TabPageOption.currentColor = UIColor.redColor()

Infinity Mode

let tabPageViewController = TabPageViewController.create() tabPageViewController.isInfinity = true

Requirements

iOS8+

Installation

Using CocoaPods

use_frameworks! pod "TabPageViewController"

Using Carthage

github "EndouMari/TabPageViewController"

Author

EndouMari, endo@vasily.jp

License

TabPageViewController is available under the MIT license. See the LICENSE file for more info.

原文  https://github.com/EndouMari/TabPageViewController
正文到此结束
Loading...