All Projects → TBXark → Tkrubberindicator

TBXark / Tkrubberindicator

Licence: mit
A rubber animation pagecontrol

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Tkrubberindicator

Tkswitchercollection
An animation switch collection
Stars: ✭ 877 (-34.41%)
Mutual labels:  cocoapods, carthage, uikit, ios-animation, coreanimation
Stepslider
StepSlider its custom implementation of slider such as UISlider for preset integer values.
Stars: ✭ 391 (-70.76%)
Mutual labels:  cocoapods, carthage, uikit, coreanimation
Gemini
Gemini is rich scroll based animation framework for iOS, written in Swift.
Stars: ✭ 2,965 (+121.77%)
Mutual labels:  cocoapods, carthage, ios-animation
Hokusai
A Swift library to provide a bouncy action sheet
Stars: ✭ 431 (-67.76%)
Mutual labels:  cocoapods, carthage, uikit
Chromacolorpicker
🎨 An intuitive iOS color picker built in Swift.
Stars: ✭ 434 (-67.54%)
Mutual labels:  cocoapods, carthage, ios-animation
Nvactivityindicatorview
A collection of awesome loading animations
Stars: ✭ 10,031 (+650.26%)
Mutual labels:  cocoapods, carthage, ios-animation
Alertift
Swifty, modern UIAlertController wrapper.
Stars: ✭ 242 (-81.9%)
Mutual labels:  cocoapods, carthage, uikit
Tweetextfield
Lightweight set of text fields with nice animation and functionality. 🚀 Inspired by https://uimovement.com/ui/2524/input-field-help/
Stars: ✭ 421 (-68.51%)
Mutual labels:  cocoapods, carthage, uikit
Pinterestsegment
A Pinterest-like segment control with masking animation.
Stars: ✭ 560 (-58.12%)
Mutual labels:  cocoapods, ios-animation, coreanimation
Statusalert
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way.
Stars: ✭ 809 (-39.49%)
Mutual labels:  cocoapods, carthage, uikit
Bfkit
BFKit is a collection of useful classes and categories to develop Apps faster.
Stars: ✭ 811 (-39.34%)
Mutual labels:  cocoapods, carthage, uikit
Swifterswift
A handy collection of more than 500 native Swift extensions to boost your productivity.
Stars: ✭ 10,706 (+700.75%)
Mutual labels:  cocoapods, carthage, uikit
Tkdotsegment
TKDotSegment is a segment with dot animation
Stars: ✭ 103 (-92.3%)
Mutual labels:  cocoapods, carthage, ios-animation
Ezswiftextensions
😏 How Swift standard types and classes were supposed to work.
Stars: ✭ 2,911 (+117.73%)
Mutual labels:  cocoapods, carthage, uikit
Watchdoginspector
Shows your current framerate (fps) in the status bar of your iOS app
Stars: ✭ 497 (-62.83%)
Mutual labels:  cocoapods, carthage, uikit
Bfkit Swift
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster.
Stars: ✭ 963 (-27.97%)
Mutual labels:  cocoapods, carthage, uikit
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (-11.74%)
Mutual labels:  cocoapods, carthage, ios-animation
Swiftlinkpreview
It makes a preview from an URL, grabbing all the information such as title, relevant texts and images.
Stars: ✭ 1,216 (-9.05%)
Mutual labels:  cocoapods, carthage
Dikit
Dependency Injection Framework for Swift, inspired by KOIN.
Stars: ✭ 77 (-94.24%)
Mutual labels:  cocoapods, carthage
Quick
The Swift (and Objective-C) testing framework.
Stars: ✭ 9,303 (+595.81%)
Mutual labels:  cocoapods, carthage

TKRubberIndicator

A rubber animation pagecontrol

Xcode 9.0+ iOS 8.0+ Swift 4.0+ Build Status CocoaPods Carthage compatible License MIT

Requirements

  • Swift 4.0
  • iOS 8.0+
  • Xcode 9.0

Installation

CocoaPods

You can use CocoaPods to install TKRubberPageControl by adding it to your Podfile:

platform :ios, '8.0'
use_frameworks!
pod 'TKRubberPageControl'

To get the full benefits import TKRubberPageControl wherever you import UIKit

import UIKit
import TKRubberPageControl

Carthage

Create a Cartfile that lists the framework and run carthage update. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/TKRubberPageControl.framework to an iOS project.

github "tbxark/TKRubberIndicator"

Manually

  1. Download and drop TKRubberPageControl.swift in your project.
  2. Congratulations!

Usage example

You can use closure or Target-Action to listen control event

class ViewController: UIViewController {

    let page = TKRubberIndicator(frame: CGRectMake(100, 100, 200, 100), count: 6)

    override func viewDidLoad() {
        super.viewDidLoad()


        self.view.backgroundColor = UIColor(red:0.553,  green:0.376,  blue:0.549, alpha:1)
        page.center = self.view.center
        page.valueChange = {(num) -> Void in
            print("Closure : Page is \(num)")
        }
        page.addTarget(self, action: "targetActionValueChange:", forControlEvents: UIControlEvents.ValueChanged)
        self.view.addSubview(page)

        page.numberOfpage = 2
    }

    @IBAction func pageCountChange(sender: UISegmentedControl) {
        page.numberOfpage = (sender.selectedSegmentIndex + 1) * 2
    }
    func targetActionValueChange(page:TKRubberIndicator){
        print("Target-Action : Page is \(page.currentIndex)")
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
}

Base

Key Usage
smallBubbleSize 未选中小球尺寸 unselect small ball size
mainBubbleSize 选中大球尺寸 select big ball size
bubbleXOffsetSpace 小球间距 The distance between the ball
bubbleYOffsetSpace 纵向间距 bubble Y Offset Space
animationDuration 动画时长 animation duration
backgroundColor 背景颜色 control background color
smallBubbleColor 小球颜色 unselect small ball color
mainBubbleColor 大球颜色 select big ball color

Release History

  • 1.4.0 Swift 4.0

  • 1.3.1 Bug Fixed

  • 1.3.0 Support Swift 3.0

  • 1.0.5 Fix bug, add Cocoapod and Carthage support

  • 1.0.4 Complete basic functions

Contribute

We would love for you to contribute to TKRubberPageControl, check the LICENSE file for more info.

Meta

TBXark – @tbxark[email protected]

Distributed under the MIT license. See LICENSE for more information.

https://github.com/TBXark

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].