Skip to content

Commit

Permalink
1.01
Browse files Browse the repository at this point in the history
  • Loading branch information
odedharth committed Dec 30, 2016
2 parents e96a724 + a2147ad commit 0be1e5d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,33 @@
[![Version](https://img.shields.io/cocoapods/v/SuperBadges.svg?style=flat)](http://cocoapods.org/pods/SuperBadges)
[![License](https://img.shields.io/cocoapods/l/SuperBadges.svg?style=flat)](http://cocoapods.org/pods/SuperBadges)
[![Platform](https://img.shields.io/cocoapods/p/SuperBadges.svg?style=flat)](http://cocoapods.org/pods/SuperBadges)
![language](https://img.shields.io/badge/Language-%20Swift%20-orange.svg)

## Example
<p align="center">
<img src="https://s23.postimg.org/zdakj47kr/Super_Bage.png" width="473.6">
</p>

To run the example project, clone the repo, and run `pod install` from the Example directory first.
Add emojis and colored dots as badges for your Tab Bar buttons ✨

## Requirements
## Usage

Add an emoji badge:

```swift
YourTabBarController.addDotAtTabBarItemIndex(index: 0, radius: 10, text : "👏🏻")
```

Add a colored dot badge:

```swift
YourTabBarController.addDotAtTabBarItemIndex(index: 0, radius: 7, color : UIColor.blue)
```

Remove badge:

```swift
YourTabBarController.removeDotAtTabBarItemIndex(index: 0)
```

## Installation

Expand All @@ -21,7 +42,10 @@ pod "SuperBadges"

## Author

odedharth, [email protected]
[1]: http://www.twitter.com/odedharth
[1.1]: http://i.imgur.com/wWzX9uB.png (twitter icon with padding)

Oded Harth [![alt text][1.1]][1]

## License

Expand Down
2 changes: 1 addition & 1 deletion SuperBadges/Classes/SuperBadges.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extension UITabBarController {
public extension UITabBarController {
func addDotAtTabBarItemIndex(index: Int, radius : CGFloat = 5, color : UIColor = UIColor.red, text : String? = nil) {
let tag = index + 999
for subview in self.tabBar.subviews {
Expand Down

0 comments on commit 0be1e5d

Please sign in to comment.