Latest 0.0.1
Homepage https://github.com/brianbryant/SFTabPage
License MIT
Platforms ios 10.0
Authors

The swift version of SFTabPage in iOS

Requirements

  • iOS 10.0+
  • Xcode 9+
  • Swift 4.0+

Communication

  • If you need help, use Stack Overflow. (Tag ‘sftabpage’)
  • If you’d like to ask a general question, use Stack Overflow.
  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate SFTabPage into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
pod 'SFTabPage', '~> 0.0.1'
end

Then, run the following command:

$ pod install

Manually

If you prefer not to use any of the aforementioned dependency managers, you can integrate SFTabPage into your project manually.

Usage

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

//        let titles = ["iPhone", "iOS", "KobeBryant", "Beautiful Girl", "UtoVR", "brianbryant", "JustinBieber", "中国", "Taylor Swift"]
        let titles = ["我的", "你的", "她的"]

        var childVCs = [UIViewController]()
        for _ in 0..<titles.count {
            let vc = UIViewController()
            vc.view.backgroundColor = UIColor.randomColor()
            childVCs.append(vc)
        }

        let style = PageStyle()
        style.isScrollEnable = false
        let titleContentView = TitleContentView(frame: self.view.bounds, style: style, titles: titles, childVCs: childVCs, parentVC: self)
        titleContentView.backgroundColor = UIColor.orange

        view.addSubview(titleContentView)
        view.backgroundColor = UIColor.red
    }
}

License

SFTabPage is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "SFTabPage",
    "version": "0.0.1",
    "summary": "The swift version of SFTabPage in iOS",
    "description": "The swift version of SFTabPage in iOSu3002u8be5u6846u67b6u5b9eu73b0u4e86Tabu6807u9898u548cPageu5185u5bb9u8054u52a8u6edau52a8u7684u6548u679cuff01",
    "homepage": "https://github.com/brianbryant/SFTabPage",
    "license": "MIT",
    "authors": {
        "brianbryant": "[email protected]"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/brianbryant/SFTabPage.git",
        "tag": "0.0.1"
    },
    "source_files": [
        "Sources",
        "Sources/**/*.{swift}"
    ],
    "exclude_files": "Sources/Exclude"
}

Pin It on Pinterest

Share This