Latest 0.1.0
Homepage https://github.com/jogendra/BedgeNotificHub
License MIT
Platforms ios 10.0
Authors

BedgeNotificHub

CI Status
Version
License
Platform

Blink Bump Pop Custom

Demo/Example

For demo:

$ pod try BedgeNotificHub

To run the example project, clone the repo, and run pod install from the Example directory first.

$ cd Example
$ pod install

If you don’t have CocoaPods installed, grab it with [sudo] gem install cocoapods.

$ open BedgeNotificHub.xcworkspace

Requirements

  • iOS 10.0 or later
  • Swift 4.2
  • Xcode 10

Installation

CocoaPods

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

pod 'BedgeNotificHub'

Manual Installation

Just drag the BedgeNotificHub.swift files into your project.

Usage

Initialization

let hub = BedgeNotificHub(view: yourView) // Initially count set to 0

Increase count value by 1

hub.increment()

Increase count by some int value

hub.increment(by: Int)

Decrease count value by 1

hub.decrement()

Decrease count by some int value

hub.decrement(by: Int)

Set count to static integer value

hub.setCount(newCount: Int)

Combine actions

hub.increment()
hub.pop()

Customization

Change the color of the notification circle

hub.setCircleColor(_ circleColor: UIColor?, label labelColor: UIColor?)

Change the border color and border width of the circle

hub.setCircleBorderColor(_ color: UIColor?, borderWidth width: CGFloat)

Set the frame of the notification circle relative to the view

hub.setCircleAtFrame(_ frame: CGRect)

Move the circle (left/right or up/down)

hub.moveCircleBy(x: CGFloat, y: CGFloat)

Changes the size of the circle. setting a scale of 1 has no effect

hub.scaleCircleSize(by scale: CGFloat)

Hide the count (Blank Bedge)

hub.hideCount()

Show count again on the bedge

hub.showCount()

Animations

Pop out and pop in the bedge

hub.pop()

Make bedge blinking

hub.blink()

Animation that jumps similar to OSX dock icons

hub.bump()

Author

BedgeNotificHub

Jogendra Kumar

BedgeNotificHub
BedgeNotificHub
BedgeNotificHub

License

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

Latest podspec

{
    "name": "BedgeNotificHub",
    "version": "0.1.0",
    "summary": "A way to quickly add a notification bedge icon to any view.",
    "description": "Make any UIView a full fledged notification center. A way to quickly add a notification bedge icon to any view.",
    "homepage": "https://github.com/jogendra/BedgeNotificHub",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "jogendra": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jogendra/BedgeNotificHub.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "10.0"
    },
    "swift_version": "4.2",
    "source_files": "BedgeNotificHub/Classes/**/*"
}

Pin It on Pinterest

Share This