All Projects → kemalbakacak → PuiSegmentedControl

kemalbakacak / PuiSegmentedControl

Licence: MIT License
PuiSegmentedControl is a customizable for segmented control.

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to PuiSegmentedControl

Cfnotify
A customizable framework to create draggable views
Stars: ✭ 490 (+2478.95%)
Mutual labels:  carthage, ui-components
Wstagsfield
An iOS text field that represents tags, hashtags, tokens in general.
Stars: ✭ 1,013 (+5231.58%)
Mutual labels:  carthage, ui-components
Multiprogressview
📊 An animatable view that depicts multiple progresses over time. Modeled after UIProgressView
Stars: ✭ 614 (+3131.58%)
Mutual labels:  carthage, ui-components
Hover
🎈 The smartest floating button
Stars: ✭ 81 (+326.32%)
Mutual labels:  carthage, ui-components
Koyomi
Simple customizable calendar component in Swift 📆
Stars: ✭ 716 (+3668.42%)
Mutual labels:  carthage, ui-components
Bettersegmentedcontrol
An easy to use, customizable replacement for UISegmentedControl & UISwitch.
Stars: ✭ 1,782 (+9278.95%)
Mutual labels:  carthage, segmentedcontrol
ng-mono-repo-starter
Angular Mono Repo Starter
Stars: ✭ 79 (+315.79%)
Mutual labels:  ui-components
awesome-cocoa
A curated list of awesome Cocoa controls for iOS, watchOS and macOS
Stars: ✭ 56 (+194.74%)
Mutual labels:  ui-components
svelteit
Svelteit is a minimalistic UI/UX component library for Svelte and Sapper projects
Stars: ✭ 64 (+236.84%)
Mutual labels:  ui-components
flextreemap
TreeMap data visualization component for Adobe Flex
Stars: ✭ 22 (+15.79%)
Mutual labels:  ui-components
pearl-ui
Pearl UI is a powerful UI toolkit that helps you build beautiful production-ready mobile apps right out of the box ⚡️
Stars: ✭ 19 (+0%)
Mutual labels:  ui-components
punic
Punic is a remote cache CLI built for Carthage and Apple .xcframework
Stars: ✭ 25 (+31.58%)
Mutual labels:  carthage
SwimplyPlayIndicator
Animated PlayIndicator written in SwiftUI. Inspired by Apple's Music Player.
Stars: ✭ 52 (+173.68%)
Mutual labels:  ui-components
native-kitchensink
📱 Playground for ReactiveSearch Native components
Stars: ✭ 46 (+142.11%)
Mutual labels:  ui-components
FDTextFieldTableViewCell
A UITableViewCell with an editable text field
Stars: ✭ 24 (+26.32%)
Mutual labels:  ui-components
business-hours-picker
A business hours picker and viewer for android
Stars: ✭ 31 (+63.16%)
Mutual labels:  ui-components
Klendario
A Swift wrapper over the EventKit framework
Stars: ✭ 44 (+131.58%)
Mutual labels:  carthage
NKJMovieComposer
NKJMovieComposer is very simple movie composer for iOS.
Stars: ✭ 40 (+110.53%)
Mutual labels:  carthage
swift-ipify
Swift library for checking your IP address from ipify.org
Stars: ✭ 37 (+94.74%)
Mutual labels:  carthage
maxLibQt
A collection of C++ classes and QtQuick QML components for use with the Qt framework.
Stars: ✭ 18 (-5.26%)
Mutual labels:  ui-components

PuiSegmentedControl is a customizable for segmented control.

Features

  • More configuration according to UISegmentedControl
  • Configure title styling with NSAttributedString.Key such as font, color etc.
  • Styling border, background, seperator etc.
  • Animated segment change (Not working with different corner radius).
  • Supported scroll when scrolling UIPageViewController (Same as above matter).
  • Supported custom page view with PuiPageViewSegmentedControl.
  • Written with Swift :)

Installation

Cocoapods

The easiest way of installing PuiSegmentedControl is via CocoaPods.

pod 'PuiSegmentedControl'

Carthage

To integrate PuiSegmentedControl into your Xcode project using Carthage, specify it in your Cartfile:

github "kemalbakacak/PuiSegmentedControl" ~> 2.0.0

Run carthage update to build the framework and drag the built PuiSegmentedControl.framework into your Xcode project.

Usage

  • Add view to your storyboard and set class PuiSegmentedControl.
  • Create outlets and import PuiSegmentedControl to your view controller.
  • Finally, set properties according to your design before set titles.
  • You can check screenshots demos under the "Example" folder.

Variables that you can use:

open var animatedTabTransitionDuration: TimeInterval = 1 // The value of the animation tab when isAnimatedTabTransition property is true
open var animatedTabTransitionRedrawDifferenceDuration: TimeInterval = 0 // The value of the redraw view difference from transition duration when isAnimatedTabTransition property is true
open var backgroundCornerRadius: CGFloat = 0 // The radius of the background.
open var backgroundCustomColor: UIColor = .clear // The color of the background.
open var borderCornerRadius: CGFloat = 0 // The radius of the control's border.
open var borderColor: UIColor = .clear // The color of the control's border.
open var borderWidth: CGFloat = 2 // The size of the width control's border.
open var unselectedViewBackgroundColor: UIColor = .white // The color of the background color.
open var unselectedViewMargins: UIEdgeInsets = .zero // The offset of the background from all around.
open var unselectedTextAttributes: [NSAttributedString.Key: Any]? // The attributes of the segment's title
open var selectedViewBackgroundColor: UIColor = .purple // The color of the selected view background color.
open var selectedViewCornerRadius: CGFloat = .zero // The corner radius of selected view.
open var selectedViewMargins: UIEdgeInsets = .zero // The offset of the selected view from all around.
open var selectedTextAttributes: [NSAttributedString.Key: Any] = [:] // The attributes of the selected segment's title
open var selectedIndex: Int = 0 // The index of the selected segment's.
open var seperatorColor: UIColor = .purple // The color of the seperator's.
open var seperatorCornerRadius: CGFloat = 2 // The radius of the seperator's.
open var seperatorWidth: CGFloat = 4 // The size of the width seperator's
open var seperatorMarginBottom: CGFloat = 0 // The offset of the seperator's from bottom.
open var seperatorMarginTop: CGFloat = 0 // The offset of the seperator's from top.
open var isAnimatedTabTransition: Bool = false // If the property is true, tab transition will be animated.
open var isSelectViewAllCornerRadius: Bool = false // If the property is true, selected segment's will be rounded.
open var isEqualWidth: Bool = true // If the property is true, segments divided equals. Otherwise, segment's divided according to text length.
open var isSeperatorActive: Bool = true // If the property is true, seperator will show.
open var items: [String] = [] // The titles of segments.

Usage with Page View

If you want to use with Page View, you need to use PuiPageViewSegmentedControl and set pages. You can example PageViewController in example project. If you want to working together with page view and segmented control then send segmented control property to page view configuration method. Threshold means selected segment change value with ratio that 0.8 means 80 percent.

self.pageView.configure(pages: self.pages,
			selectedIndex: 1,
			segmentedControl: self.segmentedControl,
			nextViewSelectionThreshold: 0.8)

Screenshot

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].