TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | May 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Dopamine.
Simple notification framework that displays an Icon, Title, and Subtitle.
CandyBar is an alternative notification view. A CandyBar includes an easily customizable icon and text. There are 11 Candy Icons provided within the framework, but you could also use your own image.
There is an example app included within this repo.
In your Podfile, include the CandyBar like below
use_frameworks!
target 'SomeonesApp' do
pod 'CandyBar'
end
Start using CandyBars! Below are examples of how to use functions provided by the framework.
// Swift
let candyBar = CandyBar(title: "You can even use emojis 💯",
icon: CandyIcon.Stars,
position: .Bottom,
backgroundColor: UIColor.purpleColor()
)
let customCandyBar = CandyBar(title: "Use a custom image!",
image: UIImage(named: "YourImage"),
backgroundColor: CandyBar.hexStringToUIColor("#4286f4"),
didDismissBlock: { NSLog("The user dismissed the CandyBar")}
)
// Objective-C
CandyBar* candyBar = [[CandyBar alloc] initWithTitle: @"Whayda go!"
subtitle: nil
position: CandyBarPositionTop
icon: CandyIconStars
backgroundColor: [CandyBar hexStringToUIColor:@"#E3DE4D"]
didDismissBlock: nil ];
// Swift
candyBar.show(3.2) // display for 3.2
customCandyBar.show() // dismiss on tap, or
// customCandyBar.dismiss() // programmatically dismiss it using bar.dismiss()seconds
// Objective-C
[customCandyBar show];
// [customCandyBar dismiss];
The DopamineAPI boosts your app’s engagement, retention, and revenue using the science of positive reinforcement. Paste in a few lines of our code we’ll figure out - in real time - the perfect moment to give each user their own little