Latest 0.1.2
Homepage https://github.com/tolgaarikan/CountdownView
License MIT
Platforms ios 9.0, requires ARC
Frameworks UIKit
Authors



CocoaPods Compatible

Preview

Installation

CountdownView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "CountdownView"

Usage

  1. import the pod

    import CountdownView
  2. use the basic show method or the one with completion block and automatic hiding

    CountdownView.show(countdownFrom: Double, spin: Bool, animation: Animation)
    CountdownView.show(countdownFrom: Double, spin: Bool, animation: Animation, autoHide: Bool, completion: (()->())?)
  3. hide if you didn’t use auto hiding

    CountdownView.hide(animation: Animation, options: (duration: Double, delay: Double), completion: (()->())?)

    Animation options

  • fadeIn
  • fadeOut
  • fadeInLeft
  • fadeInRight
  • fadeOutLeft
  • fadeOutRight
  • zoomIn
  • zoomOut

Customizing

You can access the properties below from CountdownView’s shared instance before you call the show function
as you can see in the example and customize it any way you like and need.

Example


  CountdownView.shared.frameSize = CGSize(width: 200.0, height: 200.0)

  CountdownView.shared.backgroundViewColor = UIColor.cyan

  CountdownView.shared.dismissStyle = .byTapOnOutside

  CountdownView.show(countdownFrom: Double, spin: Bool, animation: Animation)

All properties

  public var dismissStyle: DismissStyle
  public var dismissStyleAnimation: Animation

  public var frameSize: CGSize
  public var framePosition: CGPoint

  public var backgroundViewColor: UIColor

  public var counterViewBackgroundColor: UIColor
  public var counterViewShadowColor: UIColor
  public var counterViewShadowRadius: CGFloat
  public var counterViewShadowOpacity: Float

  public var spinnerLineWidth: CGFloat
  public var spinnerInset: CGFloat
  public var spinnerStartColor: UIColor
  public var spinnerEndColor: UIColor
  public var colorTransition: Bool 

  public var counterLabelFont: UIFont
  public var counterLabelTextColor: UIColor

  public var counterSubLabelText: String
  public var counterSubLabelFont: UIFont
  public var counterSubLabelTextColor: UIColor  

  public var closeButtonTitleLabelText: String
  public var closeButtonTitleLabelFont: UIFont
  public var closeButtonTitleLabelColor: UIColor
  public var closeButtonTopAnchorConstant: CGFloat
  public var closeButtonLeftAnchorConstant: CGFloat
  public var closeButtonImage: UIImage
  public var closeButtonTintColor: UIColor

Requirements

  • iOS 9.0+
  • Swift 3+
  • ARC

License

CountdownView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "CountdownView",
    "version": "0.1.2",
    "summary": "Simple countdown view with custom animations",
    "description": "Simple countdown view for showing the remaining time with options like spinning and in/out animations.",
    "homepage": "https://github.com/tolgaarikan/CountdownView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Tolgahan Arikan": "[email protected]"
    },
    "source": {
        "git": "https://github.com/tolgaarikan/CountdownView.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "CountdownView/Classes/**/*",
    "requires_arc": true,
    "frameworks": "UIKit",
    "social_media_url": "https://twitter.com/tolgahanarikan",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This