Swiftpack.co - Package - hiiragi252/TDTabView

TDTabView

Pod Platform Pod License Pod Version Carthage Compatible Swift Package Manager compatible

TDTabView is tab View like Safari.

Demo

Usage

import UIKit
import TDTabView

class ViewController: TDTabViewController {
    
    var vc1: UIViewController!
    var vc2: UIViewController!
    var vc3: UIViewController!

    override func viewDidLoad() {
        super.viewDidLoad()
        self.delegate = self
        
        let storyboard1 = UIStoryboard(name: "Table", bundle: nil)
        vc1 = storyboard1.instantiateInitialViewController()
        
        let storyboard2 = UIStoryboard(name: "Image", bundle: nil)
        vc2 = storyboard2.instantiateInitialViewController()
        
        let storyboard3 = UIStoryboard(name: "Web", bundle: nil)
        vc3 = storyboard3.instantiateInitialViewController()
    }
}

extension ViewController: TDTabViewControllerDelegate {
    func viewControllers() -> [UIViewController] {
        return [vc1, vc2, vc3]
    }
    
    func backgroundColor() -> UIColor? {
        return UIColor(red: 50/255, green: 50/255, blue: 50/255, alpha: 0.8)
    }
}

Installation

CocoaPods

Add this to your Podfile.

pod 'TDTabView'

Carthage

Add this to your Cartfile.

github "ymarui/TDTabView"

License

MIT

Github

link
Stars: 2

Dependencies

Used By

Total: 0

Releases

-

First Release -