Latest 1.1.0
Homepage https://github.com/DopamineLabs/CandyBar-iOS
License MIT
Platforms ios 8.0
Authors

CandyBar-iOS

Simple notification framework that displays an Icon, Title, and Subtitle.

What is CandyBar?

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.

Looking for an iOS Example App?

There is an example app included within this repo. To run the example project, clone the repo, and run pod install from the Example directory first.

CandyBarCandyBar

Set up CandyBar

CocoaPods

  1. Install CocoaPods by running the following command in terminal:

    gem install cocoapods
  2. Create a Podfile in your Xcode project directory like below:

    use_frameworks!
    
    target '<YourProjectTarget>' do
        pod 'CandyBar'
    end

    Using terminal, cd to your project directory and run pod install to build your dependencies.

  3. Start using CandyBars! Below are examples of how to use functions provided by the framework.
Creating a CandyBar
  // 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 ];
Displaying a CandyBar
  // 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];

User engagement isn’t luck: it’s science.

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 💥 of Dopamine. Powered by state of the art neuroscience and AI: no PhD required. Grab your free account and get started in minutes at UseDopamine.com.

Latest podspec

{
    "name": "CandyBar",
    "version": "1.1.0",
    "summary": "Simple notification framework that displays an Icon, Title, and Subtitle.",
    "description": "CandyBar is an alternative notification view. A CandyBar includes an easily customizable icon image, and title and subtitle text. There are 11 Candy Icons provided within the framework, but you could also use a custom own image.",
    "homepage": "https://github.com/DopamineLabs/CandyBar-iOS",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Akash Desai": "[email protected]"
    },
    "source": {
        "git": "https://github.com/DopamineLabs/CandyBar-iOS.git",
        "tag": "1.1.0"
    },
    "social_media_url": "https://twitter.com/usedopamine",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Sources/**/*",
    "resource_bundles": {
        "CandyIcons": [
            "Resources/CandyIcons.xcassets"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This