Animated top/bottom segmented control written in Swift.

Overview

Segmentio

Platform License Swift 5 Carthage compatible Swift Package Manager

Animated top/bottom segmented control written in Swift.

Preview

Check this project on dribbble.

Requirements

  • Xcode 10
  • iOS 8.x+
  • Swift 5.0

Installation

CocoaPods

use_frameworks! 

pod 'Segmentio'

CocoaPods v1.1.0 or later required

Carthage

github "Yalantis/Segmentio"

Usage

Import Segmentio module

import Segmentio

Init

You can initialize a Segmentio instance from code:

var segmentioView: Segmentio!

let segmentioViewRect = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 125)
segmentioView = Segmentio(frame: segmentioViewRect)
view.addSubview(segmentioView)

or

add a UIView instance in your .storyboard or .xib, set Segmentio class and connect IBOutlet:

@IBOutlet weak var segmentioView: Segmentio!

Setup Segmentio

segmentioView.setup(
	content: [SegmentioItem],
	style: SegmentioStyle,
	options: SegmentioOptions?
)

To start with default options you can just pass nil to the options parameter.

segmentioView.setup(
	content: [SegmentioItem],
	style: SegmentioStyle,
	options: nil
)

Configuring items

In order to set items you need to create an array of SegmentioItem instances:

var content = [SegmentioItem]()

let tornadoItem = SegmentioItem(
	title: "Tornado",
	image: UIImage(named: "tornado")
)
content.append(tornadoItem)

Handling selection

You can specify selected item manually:

segmentioView.selectedSegmentioIndex = 0

Handling callback

segmentioView.valueDidChange = { segmentio, segmentIndex in
	print("Selected item: ", segmentIndex)
}

Customization

Segmentio can be customized by passing an instance of SegmentioOptions struct:

SegmentioOptions(
            backgroundColor: .white,
            segmentPosition: SegmentioPosition,
            scrollEnabled: true,
            indicatorOptions: SegmentioIndicatorOptions,
            horizontalSeparatorOptions: SegmentioHorizontalSeparatorOptions,
            verticalSeparatorOptions: SegmentioVerticalSeparatorOptions,
            imageContentMode: .center,
            labelTextAlignment: .center,
            segmentStates: SegmentioStates
)

Segment width rely on SegmentioPosition enum. Width can be fixed according to maximum visible items or dynamic according to segment's content size:

enum SegmentioPosition {
    case dynamic
    case fixed(maxVisibleItems: Int)
}

Selection indicator can be customized by passing an instance of SegmentioIndicatorOptions:

SegmentioIndicatorOptions(
            type: .bottom,
            ratio: 1,
            height: 5,
            color: .orange
)

Horizontal borders can be customized by passing an instance of SegmentioHorizontalSeparatorOptions:

SegmentioHorizontalSeparatorOptions(
            type: SegmentioHorizontalSeparatorType.topAndBottom, // Top, Bottom, TopAndBottom
            height: 1,
            color: .gray
)

Separators between segments can be customized by passing an instance of SegmentioVerticalSeparatorOptions:

SegmentioVerticalSeparatorOptions(
            ratio: 0.6, // from 0.1 to 1
            color: .gray
)

In order to set SegmentioStates you need to create a tuple of SegmentioState instances:

SegmentioStates(
            defaultState: SegmentioState(
                backgroundColor: .clear,
                titleFont: UIFont.systemFont(ofSize: UIFont.smallSystemFontSize),
                titleTextColor: .black
            ),
            selectedState: SegmentioState(
                backgroundColor: .orange,
                titleFont: UIFont.systemFont(ofSize: UIFont.smallSystemFontSize),
                titleTextColor: .white
            ),
            highlightedState: SegmentioState(
                backgroundColor: UIColor.lightGray.withAlphaComponent(0.6),
                titleFont: UIFont.boldSystemFont(ofSize: UIFont.smallSystemFontSize),
                titleTextColor: .black
            )
)

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.

P.S. We’re going to publish more awesomeness wrapped in code and a tutorial on how to make UI for iOS (Android) better than better. Stay tuned!

License

The MIT License (MIT)

Copyright © 2019 Yalantis

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.

Comments
  • Dynamic segment sizing

    Dynamic segment sizing

    This PR adds support for dynamic segment sizing based on the content size of the segment. Instead of fixing the number of visible cells, each cell is a different size based on the length of its title (plus the image in the case of the imageBefore and imageAfter styles). The way to use it is to pass a SegmentioPosition option in the initializer, either .dynamic or .fixed(maxVisibleItems: 3). The fixed option is the same behavior that exists currently. Changes:

    • Add SegmentioPosition enum with fixed and dynamic options
    • Replace maxVisibleItems with maxVisibleItems property in fixed case eg. .fixed(maxVisibleItems: 3)
    • Update Points extension with more parameters for dynamic layout calculations
    • Replace scrollToItem at index path calls with scrollRectToVisible in scrollToItemAtContext
    • Update itemInSuperview method for dynamic and fixed position cases
    • Separated method for calculating segment width
    • Added width property to SegmentioItem
    • Update example project

    There are quite a few changes in this PR so if you want anything updated, changed, done differently, etc. please let me know and I’m happy to do it!

    Ty for the awesome framework.

    type: enhancement priority: high status: queued 
    opened by maxcampolo 13
  • Is there any functionality to create tabs with different widths?

    Is there any functionality to create tabs with different widths?

    Is there any functionality to create tabs with different widths? For example I need to create 3 tabs with such texts: "All", "BlaBlaBlaBlaFilms", "Horror" and want to see it like this:

    | All | BlaBlaBlaBlaFilms | Horror |

    and not in a such way:

    | -------All----------| BlaBlaBlaBlaFilms |-------Horror---------|

    Thanks @YuryGrinenko @edBaev @constantineSafronov @dimazen @sfes @serejahh

    type: enhancement 
    opened by Gurbo 10
  • AutoLayout Issue

    AutoLayout Issue

    Keep crashing on setup...

    Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:]: A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal constraint of a location equal to a constant. Location attributes must be specified in pairs'
    

    After checking with debugger it looks like it crashes on line 196 in Segmentio.swift when function setupHorizontalSeparator() is called.... Any thoughts?

    type: bug 
    opened by croossin 10
  • Can't see titles IOS10

    Can't see titles IOS10

    Hi

    Thanks for awesome competent.

    My error is; item titles of segments aren't seen for IOS10. But everything works well for IOS11.

    screen shot 2018-02-15 at 13 23 20

    `

    var segmentItems = [SegmentioItem]()
    for item in orderedLocationList {
      let segmentItem = SegmentioItem(title: item.location, image:nil)
      segmentItems.append(segmentItem)
    }
    
    
    let indicatorOptions =  SegmentioIndicatorOptions(type: .bottom, ratio: 1.0, height: 3.0, color: .focepGreenColor())
    
    let states = SegmentioStates(
      defaultState: SegmentioState(
        backgroundColor: .clear,
        titleFont: UIFont.systemFont(ofSize: 15),
        titleTextColor: .black
      ),
      selectedState: SegmentioState(
        backgroundColor: .clear,
        titleFont: UIFont.systemFont(ofSize: 15),
        titleTextColor: .focepGreenColor()
      ),
      highlightedState: SegmentioState(
        backgroundColor: .clear,
        titleFont: UIFont.systemFont(ofSize: 15),
        titleTextColor: .focepGreenColor()
      )
    )
    
    let  horizontalSeparatorOptions = SegmentioHorizontalSeparatorOptions(
      type: SegmentioHorizontalSeparatorType.topAndBottom, // Top, Bottom, TopAndBottom
      height: 0,
      color: .gray
    )
    
    locationSegmentedControl.setup(
      content: segmentItems ,
      style: SegmentioStyle.onlyLabel,
      options: SegmentioOptions(backgroundColor: .white, segmentPosition: .fixed(maxVisibleItems: 3), scrollEnabled: false, indicatorOptions: indicatorOptions, horizontalSeparatorOptions:  horizontalSeparatorOptions , verticalSeparatorOptions: nil, imageContentMode: .center, labelTextAlignment: .center, labelTextNumberOfLines: 1, segmentStates:states, animationDuration: 0.25)
    )
    
    locationSegmentedControl.valueDidChange = { segmentio, segmentIndex in
      self.segmentedControlValueDidChange(segmentIndex: segmentIndex)
    }
    

    `

    type: bug priority: medium status: queued 
    opened by yatanadam 9
  • Autolayout issue using Segmentio programtically

    Autolayout issue using Segmentio programtically

    I use the Segmentio and add it programmatically. I use PureLayout to make the constrains. I have made an autolayout view and add Segmentio as a subview to it. I have constrained the height to be 150 on iPad.

    When I run I got the following error

     Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
    2016-10-03 21:24:57.844699 mobshop[2977:1277011] The behavior of the UICollectionViewFlowLayout is not defined because:
    2016-10-03 21:24:57.844801 mobshop[2977:1277011] the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
    2016-10-03 21:24:57.845131 mobshop[2977:1277011] The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x1969f2f0>, and it is attached to <UICollectionView: 0x153d0800; frame = (0 0; 512 200); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x196a0040>; layer = <CALayer: 0x1969f8d0>; contentOffset: {0, -64}; contentSize: {680, 136}> collection view layout: <UICollectionViewFlowLayout: 0x1969f2f0>. 
    

    I have checked the example provided and it seems to do the same as me expect for that it is done using storyboard.

    type: bug 
    opened by engmsaleh 9
  • Expression type SegmentioOptions is ambiguous without more context

    Expression type SegmentioOptions is ambiguous without more context

    Report

    The more information you provide, the faster we can help you.

    When building the example project, I receive a compile error on line 95 of ExampleViewController.swift.

    ⚠️ Select what you want report a bug*

    Report a bug

    What did you do?

    Tried to build the examples repository

    What did you expect to happen?

    Compile

    What happened instead?

    Received an error in the ExampleViewController.swift on line 95. Expression type type SegmentioOptions is ambiguous without more context.

    Your Environment

    • Version of the component: Most recent
    • Swift version: 3
    • iOS version: 10
    • Device: Simulators
    • Xcode version: 8

    Project that demonstrates the bug

    Examples in the current github project

    opened by surayashivji 8
  • Top and bottom black lines are displayed unconditionally

    Top and bottom black lines are displayed unconditionally

    There is an issue with your example. I've just cloned repo and run it and here's what I see: screenshot at sep 02 16-36-27

    There are black lines at top and bottom of Segmentio while nothing is on GIF-demo. Could you please clarify is it a bug or feature? And in case if it's feature - let me know how to disable it?

    type: bug 
    opened by gooooer 6
  • Background color not changing in onlyLabel mode

    Background color not changing in onlyLabel mode

    • Version of the component: 2.1
    • Swift version: 3
    • iOS version: 10.1
    • Device: iPhone 7
    • Xcode version: 8.1

    You can reproduce this issue in your example project, by just changing the backgroundColor of default state from clear to white. Background color of selected item is not changing.

    screen shot 2017-01-17 at 11 02 48 screen shot 2017-01-17 at 11 03 07

    type: bug priority: high 
    opened by onurays 5
  • Selected State Title Color Not Changing

    Selected State Title Color Not Changing

    Please see the code sample and screenshot below. I tried debugging Segmentio and SegmentioCell classes and seems like selected state is never set true. Because, UICollectionViewDataSource is not triggered after selection changed from reloadSegmentio().

    screen shot 2016-12-14 at 14 23 57
    var content = [SegmentioItem]()
            
            content.append(SegmentioItem(
                title: "ONE WAY",
                image: nil))
            content.append(SegmentioItem(
                title: "ROUNDTRIP",
                image: nil))
            
            
            switchTripType.setup(
                content: content,
                style: SegmentioStyle.onlyLabel,
                options: SegmentioOptions(
                    backgroundColor: UIColor.clear,
                    maxVisibleItems: 3,
                    scrollEnabled: true,
                    indicatorOptions: SegmentioIndicatorOptions(
                        type: .bottom,
                        ratio: 1,
                        height: 2,
                        color: UIColor.white
                    ),
                    
                    horizontalSeparatorOptions: SegmentioHorizontalSeparatorOptions(
                        type: SegmentioHorizontalSeparatorType.topAndBottom,
                        height: 1,
                        color: UIColor.clear
                    ),
                    verticalSeparatorOptions: nil,
                    /*
                    verticalSeparatorOptions: SegmentioVerticalSeparatorOptions(
                        ratio: 0.6,
                        color: UIColor.white
                    ),
                    */
                    imageContentMode: UIViewContentMode.center,
                    labelTextAlignment: NSTextAlignment.center,
                    labelTextNumberOfLines: 1,
                    segmentStates: SegmentioStates(defaultState:
                        SegmentioState(
                            backgroundColor: UIColor.clear,
                            titleFont: UIFont.systemFont(ofSize: UIFont.smallSystemFontSize),
                            titleTextColor: UIColor.white)
                        ,selectedState: SegmentioState(
                            backgroundColor: UIColor.clear,
                            titleFont: UIFont.boldSystemFont(ofSize: UIFont.smallSystemFontSize),
                            titleTextColor: UIColor.white.withAlphaComponent(0.30))
                        ,highlightedState: SegmentioState(
                            backgroundColor: UIColor.white.withAlphaComponent(0.15),
                            titleFont: UIFont.boldSystemFont(ofSize: UIFont.smallSystemFontSize),
                            titleTextColor: UIColor.white)),
                    animationDuration: 0.1
                )
            )
    
    type: bug 
    opened by onurays 5
  • RTL support

    RTL support

    Report

    a feature request

    A feature request

    RTL support

    What do you want to add?

    Currently Segmentio scroll is not adjustable in RTL views. I want it to automatically support the scroll direction

    Your Environment

    • Version of the component: 4
    • Swift version: 4.2
    • iOS version: 11.4
    • Device: iPhone X
    • Xcode version: Xcode 9.4.1

    Stack

       CocoaPods : 1.4.0
            Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin17]
        RubyGems : 2.5.2.3
            Host : Mac OS X 10.13.6 (17G65)
           Xcode : 9.4.1 (9F2000)
             Git : git version 2.15.2 (Apple Git-101.1)
    Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
    Repositories : bitbucket-jetsrewardspod - https://[email protected]/AfrozMuhammad/jetsrewardspod.git @ d536a626db7584b2aea79244a16672f4f556bd39
                   master - https://github.com/CocoaPods/Specs.git @ c16dcc667abff3c3e1e52cebb1280ce19b5999f7
    

    Installation Source

    Executable Path: /usr/local/bin/pod
    

    Plugins

    cocoapods-deintegrate : 1.0.2
    cocoapods-plugins     : 1.0.0
    cocoapods-search      : 1.0.0
    cocoapods-stats       : 1.0.0
    cocoapods-trunk       : 1.3.0
    cocoapods-try         : 1.1.0
    

    ` and insert here_

    opened by AfrozZaheer 4
  • Just trying to set it up but failed

    Just trying to set it up but failed

    Hi,

    I know it's embarrassing to ask but at the moment I start to feel that I have to.

    I came across a few segmented controls and found Segmentio. It looks great so I want to use it in my own project.

    Honestly, this has been the most frustrating tool I have ever tried.. Because after reading the tutorial, set up minimal things Segmentio needed and booted it up, it didn't work. Showing two big coloured box, as I configured, without responding to clicks...

    it looks like it's frozen..

    So then I tried to set Segmentio up with the options, carefully taking snippets from, again the tutorial without modifying anything, still it's frozen...

    I started to doubt my life...

    After played around it a while, I realised that if I set the height of the Segmentio view to 150, I would see things and it responds to click. However console is giving me this printout ever time a tab is clicked:

    2017-08-06 04:14:22.447 app[53497:25921392] The behavior of the UICollectionViewFlowLayout is not defined because: 2017-08-06 04:14:22.448 app[53497:25921392] the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values. 2017-08-06 04:14:22.448 app[53497:25921392] The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x7fd75862ee60>, and it is attached to <UICollectionView: 0x7fd75904f400; frame = (0 0; 414 150); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x618000250b30>; layer = <CALayer: 0x61800022ca20>; contentOffset: {0, -64}; contentSize: {552, 37}> collection view layout: <UICollectionViewFlowLayout: 0x7fd75862ee60>. 2017-08-06 04:14:22.448 app[53497:25921392] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.

    I started again, to doubt my life...

    What I did was very basic. I set up a view in navigation controller, which is inside a tab view controller. So basically, above the Segmentio view, it's the navigation bar. Below the Segmentio view, it's a empty table view, below that, is the tab bar.

    I used story board to set the class and IBOutlet. Nothing fancy..

    Somebody please safe my life...

    Thanks in advance.

    opened by biogerm 4
  • "Segmentio-Segmentio" requires a development team.

    Report

    Report a bug

    What did you do?

    • getting this error while run app on actual device.
    • "Signing for "Segmentio-Segmentio" requires a development team. Select a development team in the Signing & Capabilities editor."

    What did you expect to happen?

    • no need development team to run on device

    Your Environment

    • Version of the component: 4.1
    • Swift version: 5.0
    • iOS version: 15.7
    • Device: iPhone 6s
    • Xcode version: 14.0
    • If you use Cocoapods: run pod env | pbcopy and insert here

    Stack

       CocoaPods : 1.11.3
            Ruby : ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21]
        RubyGems : 3.0.3.1
            Host : macOS 12.6 (21G115)
           Xcode : 14.0 (14A309)
             Git : git version 2.37.0 (Apple Git-136)
    Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
    Repositories : trunk - CDN - https://cdn.cocoapods.org/
    

    Installation Source

    Executable Path: /usr/local/bin/pod
    

    Plugins

    cocoapods-binary      : 0.4.4
    cocoapods-deintegrate : 1.0.4
    cocoapods-plugins     : 1.0.0
    cocoapods-search      : 1.0.0
    cocoapods-trunk       : 1.5.0
    cocoapods-try         : 1.2.0
    

    Podfile

    # Uncomment the next line to define a global platform for your project
    platform :ios, '14.0'
    
    target 'projectName' do
      # Comment the next line if you don't want to use dynamic frameworks
      use_frameworks!
      
      # Pods for projectName
      
      # For Keyboard handle
      pod 'IQKeyboardManagerSwift'
      
      #For Code Structure setup
      pod 'SwiftLint'
      
      #TextField
      pod 'RAGTextField'
      
      #For APIs call
      pod 'Alamofire'
      
      #Activity Progress Bar
      pod 'MBProgressHUD'
      
      #Toast View
      pod 'Toast-Swift'
      
      #TrueTime calculate
      pod 'TrueTime'
      
      # Image load
      pod 'SDWebImage'
      
      # Segment Page Controller
      pod 'Segmentio'
      
      # Firebase 
      #Firebase Utilies
      pod 'Firebase/Crashlytics'
      pod 'Firebase/Analytics'
      pod 'Firebase/Performance'
      
      #Push Notification
      pod 'Firebase/Messaging'
      
      #Internet Availability checker
    #  pod "Connectivity"
       
    end
    
    opened by vipinsainiJT 2
  • swift 5.5.1  build Error

    swift 5.5.1 build Error

    Report

    The more information you provide, the faster we can help you.

    ⚠️ Select what you want - a feature request or report a bug. Please remove the section you aren't interested in.

    A feature request

    What do you want to add?

    Please describe what you want to add to the component.

    How should it look like?

    Please add images.

    Report a bug

    What did you do?

    Please replace this with what you did.

    What did you expect to happen?

    Please replace this with what you expected to happen.

    1. Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6)
    2. swift Compiler Error Segmentation Fault

    What happened instead?

    Please replace this with what happened instead.

    Your Environment

    • Version of the component: insert here
    • Swift version: _insert here_5.5.1
    • iOS version: _insert here_13.2
    • Device: insert here
    • Xcode version: insert here
    • If you use Cocoapods: run pod env | pbcopy and insert here
    • If you use Carthage: run carthage version | pbcopy and insert here

    Project that demonstrates the bug

    Please add a link to a project we can download that reproduces the bug.

    opened by liyuemin7 0
  • App crash when device orientation is changed

    App crash when device orientation is changed

    What did you do?

    Run app and change device orientation

    What did you expect to happen?

    App should work in all orientation

    What happened instead?

    App crashed immediately

    Your Environment

    • Version of the component: Latest
    • Swift version: 5.0
    • iOS version: 14.5
    • Device: iPhone 8 Plus Simulator
    • Xcode version: xcode12.5
    • If you use Cocoapods: run | pbcopy` and insert here

    Stack

       CocoaPods : 1.10.1
            Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
        RubyGems : 3.0.3
            Host : macOS 11.4 (20F71)
           Xcode : 12.5 (12E262)
             Git : git version 2.30.1 (Apple Git-130)
    Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
    Repositories : trunk - CDN - https://cdn.cocoapods.org/
    

    Installation Source

    Executable Path: /usr/local/bin/pod
    

    Plugins

    cocoapods-deintegrate : 1.0.4
    cocoapods-plugins     : 1.0.0
    cocoapods-search      : 1.0.0
    cocoapods-trunk       : 1.5.0
    cocoapods-try         : 1.2.0
    

    Podfile

    # Uncomment the next line to define a global platform for your project
    platform :ios, '13.2'
    target 'TabBarV1' do
      # Comment the next line if you don't want to use dynamic frameworks
      use_frameworks!
    
      # Pods for TabBarV1
      pod 'Segmentio'
    end
    

    Crash Info:

    *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No view controllers' File : Segmentio.swift After end of function : open override func layoutSubviews() {}

    Device orientation change cash log.txt

    Project that demonstrates the bug

    https://github.com/ReflectCode/PagerAdapter-demo

    opened by ReflectCode 1
  • Ability to deselect

    Ability to deselect

    A feature request

    What do you want to add?

    The ability to deselect the currently selected index. I understand that this may not be how most people would use this view but I think its simple enough and it can make the view more usable in some situations.

    How should it look like?

    It can be a function call deselect() this function can update the currently selected index to -1 and update the ui as needed.


    Thank you

    opened by ivanlares 0
Releases(3.0)
Owner
Yalantis
Knowledge is power and the way to get power is by sharing knowledge. We are open source because this is a smart way to live, work and play.
Yalantis
Customisable iOS bottom menu works like Tabbar

SSCustomTabMenu Simple customizable iOS bottom menu works like Tabbar, in Swift. Features Simple and customizable iOS Tab Menu items, in Swift. Requir

Simform Solutions 81 Aug 3, 2022
iOS Top Tab Navigation

iOS-Top-Tab-Navigation Good news for all our users out there! Now there are no boundaries to your convenience, you can pass as much words as you want

MindInventory 14 Aug 3, 2022
A fully customizable container view controller to display a set of ViewControllers in a horizontal scroll view. Written in Swift.

DTPagerController This is a control for iOS written in Swift. DTPagerController is simple to use and easy to customize. Screenshots Default segmented

Tung Vo 290 Nov 13, 2022
youtube iOS app template written in swift 5

Youtube iOS Template Youtube iOS Template is developed by Haik Aslanyan and written in Swift 3. Purpose of this repo is to show how ViewControllers ca

Henry Aslanyan 2.5k Jan 4, 2023
A custom tab bar controller for iOS written in Swift 4.2

A custom tab bar controller for iOS written in Swift 4.0 Screenshots Installation Cocoa Pods: pod 'AZTabBar' Swift Package Manager: You can use The Sw

Antonio Zaitoun 335 Dec 11, 2022
🐛 WormTabStrip ViewPager for iOS written in Swift, which gives continuous feedback to the user when scrolling

Worm Tab Strip Worm Tab Strip is inspired by android SmartTabStrip, android view pager like library for iOS written in swift. Basically it was build u

EzimetYusup 176 Dec 13, 2022
:octocat: AdaptiveController is a 'Progressive Reduction' Swift UI module for adding custom states to Native or Custom iOS UI elements. Swift UI component by @Ramotion

ADAPTIVE TAB BAR 'Progressive Reduction' module for adding custom states to Native or Custom UI elements. We specialize in the designing and coding of

Ramotion 2k Nov 9, 2022
RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion

ANIMATED TAB BAR Swift UI module library for adding animation to iOS tabbar items and icons.

Ramotion 11k Jan 8, 2023
Aesthetic floating tab bar ––– SwiftUI & Combine ⛓️ Importable via Swift Package Manager 📦

FloatingTabBar An aesthetic floating tab bar made with SwiftUI & Combine importabable via Swift Package Manager ?? Based off BottomBar-SwiftUI Preview

10011.co 135 Jan 8, 2023
Pager is the simplest and best way to implement sliding view controllers in Swift

Pager is the simplest and best way to implement sliding view controllers. Installation Drop in the Spring folder to your Xcode project. Or via CocoaPo

Lucas Oceano 234 Aug 5, 2022
SwipeViewController is a Swift modification of RKSwipeBetweenViewControllers - navigate between pages / ViewControllers

SwipeViewController What is SwipeViewController? SwipeViewController enables you to modify the navigation bar and implement 'Swipe Buttons' that can u

Marek Fořt 657 Dec 6, 2022
Aesthetic floating tab bar ––– SwiftUI & Combine ⛓️ Importable via Swift Package Manager 📦

FloatingTabBar An aesthetic floating tab bar made with SwiftUI & Combine importabable via Swift Package Manager ?? Based off BottomBar-SwiftUI Preview

10011.co 134 Jan 5, 2023
CustomTabBar - A Custom TabBar Built Using Swift

CustomTabBar Thanks to Riccardo Cipolleschi for his awesome tutorial. The TabBar

SM Arif Ahmed 1 Feb 14, 2022
Alignment Control is a component to align top, middle, bottom, left, center, right.

AlignmentControl is a component for alignment Direction AlignmentDirection Horizontal Vertical Mode AlignmentMode Left Center Right Top Middle Bottom

Beslan Tularov 38 Mar 16, 2022
A segmented control with custom appearance and interactive animations. Written in Swift 3.0.

SJFluidSegmentedControl About If you are bored with using the default UISegmentedControl, this might save your day. SJFluidSegmentedControl is a custo

Sasho Jadrovski 904 Dec 30, 2022
RCalendarPicker A date picker control, Calendar calendar control, select control, calendar, date selection, the clock selection control.

RCalendarPicker RCalendarPicker Calendar calendar control, select control, calendar, date selection, the clock selection control. 日历控件 ,日历选择控件,日历,日期选择

杜耀辉 131 Jul 18, 2022
Customizable segmented control with interactive animation.

LUNSegmentedControl Purpose LUNSegmentedControl is control designed to let developers use segmented control with custom appearance, customizable inter

Stormotion 346 Dec 25, 2021
AKASegmentedControl is a fully customizable Segmented Control for iOS

#AKASegmentedControl AKASegmentedControl is a fully customizable Segmented Control for iOS ##Preview ##Usage Installation CocoaPods You can use CocoaP

Ali Karagoz 389 Sep 1, 2022
A customizable Segmented Control for iOS. Supports text and image.

YUSegment 中文文档 A customizable segmented control for iOS. Features Supports both (Attributed)text and image Supports show separator Supports hide indic

YyGgQq 112 Jun 10, 2022
zekunyan 608 Dec 30, 2022