Popularity
2.6
Stable
Activity
0.0
Declining
107
5
11

Programming language: Swift
License: GNU General Public License v3.0 or later
Tags: UI     Tab Bar    
Latest version: v1.2.0

SmoothTab alternatives and similar libraries

Based on the "Tab Bar" category.
Alternatively, view SmoothTab alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of SmoothTab or a related project?

Add another 'Tab Bar' Library

README

SmoothTab

iOS 11.0+ Swift 5.x Badge w/ Version

[Preview](preview.png)

Requirements

  • iOS 11.0+
  • Swift 5.x
  • Xcode 10+

Installation

CocoaPods

pod 'SmoothTab'

How to use

Complete screen

To setup and customize the component you should create items with SmoothTabItem.

// Set Smooth Tab View on UIView in stroyboard
@IBOutlet weak var smoothTabView: SmoothTabView!

// Or create it without storyboard
let smoothTabView = SmoothTabView()
self.addSubview(smoothTabView)

let items: [SmoothTabItem] = [...]

// For configuring styles create new SmoothTabOptions
var options = SmoothTabOptions()
options.titleColor = UIColor.white
options.titleFont = .systemFont(ofSize: 16)
options.shadow = .default

// Finally call setup smoothTabView with items, options and give delegate
smoothTabView.setup(with: items, options: options, delegate: self)

You can customize views with options SmoothTabOptions, SmoothTabShadowOptions:


/// For set corner radius to selected view
///
/// - rounded: for calculating rounded view
/// - fixed: fixed corner radius with corner option
public enum CornerRadius {
    case rounded
    case fixed(corner: CGFloat)
}

public struct SmoothTabOptions {

    /// Tabs parent view options
    public var backgroundColor: UIColor
    public var imageContentMode: UIViewContentMode
    public var itemsMargin: CGFloat
    public var shadow: SmoothTabShadowOptions?
    public var align: ContentPreferredAlign

    /// Selected View Options
    public var titleFont: UIFont
    public var titleColor: UIColor
    public var cornerRadius: CornerRadius
    public var borderWidth: CGFloat
    public var borderColor: UIColor
    public var innerPadding: CGFloat
    public var imageTitleMargin: CGFloat

}

public struct SmoothTabShadowOptions {

    public var color: UIColor
    public var offset: CGSize
    public var opacity: Float
    public var radius: CGFloat

}

For tab selection action please implement SmoothTabDelegate:

@objc public protocol SmoothTabDelegate: class {
    func smootItemSelected(at index: Int)
}

Support

Feel free to open issuses with any suggestions, bug reports, feature requests, questions.

Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding the animation.

License

The MIT License (MIT)

Copyright (c) 2018 Yervand

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


*Note that all licence references and agreements mentioned in the SmoothTab README section above are relevant to that project's source code only.