Latest 1.0.1
Homepage https://github.com/dtrisciuoglio/TabLayoutView
License MIT
Platforms ios 9.0
Authors

Language
CocoaPods Compatible
License
Email

A TabLayoutView object is a horizontal control made of multiple tabs, each tab functioning as a discrete button.

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

TabLayoutView

    // Initialize the tab layout view
    let origin = CGPoint(x: 0, y: 0)
    let size = CGSize(width: 280, height: 44)
    let frame = CGRect(origin:origin, size:size)
    let tabLayoutView = TabLayoutView(frame: frame)
    tabLayoutView.center = self.view.center

    // Set the type
    tabLayoutView.type = .normal

    // Set the indicator position
    tabLayoutView.indicatorPosition = .bottom

    // Set the indicator color
    tabLayoutView.indicatorColor = .red

    // Set the font color
    tabLayoutView.fontColor = .red

    // Set the font selected color
    tabLayoutView.fontSelectedColor = .black

    // Set the items
    tabLayoutView.items = ["Test A", "Test B", "Test C", "Test D", "Test E", "Test F", "Test G", "Test H", "Test I", "Test L"]

    // Set the delegate
    tabLayoutView.delegate = self

    // Add it as a subview
    self.view.addSubview(tabLayoutView)

Also support xib and storyboard

Requirements

  • iOS 9.0+
  • Xcode 8.3.3
  • Swift 3.0+

Installation

CocoaPods

You can use CocoaPods to install TabLayoutView by adding it to your Podfile:


   platform :ios, '9.0'
   use_frameworks!
   pod "TabLayoutView"

Author

Dario Trisciuoglio

License

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

Latest podspec

{
    "name": "TabLayoutView",
    "version": "1.0.1",
    "summary": "An iOS tab view.",
    "description": "A `TabLayoutView` object is a horizontal control made of multiple tabs, each tab functioning as a discrete button.",
    "homepage": "https://github.com/dtrisciuoglio/TabLayoutView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Dario Trisciuoglio": "[email protected]"
    },
    "source": {
        "git": "https://github.com/dtrisciuoglio/TabLayoutView.git",
        "tag": "1.0.1"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "source/*.{swift}",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This