Skip to content

Commit

Permalink
Update README.markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Davies committed Apr 5, 2012
1 parent dc7df88 commit 8dd1d5a
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions README.markdown
Expand Up @@ -5,20 +5,28 @@
TDBadgedCell grew out of the need for TableViewCell badges and the lack of them in iOS (see the [article explaining this on TUAW](http://www.tuaw.com/2010/01/07/iphone-devsugar-simple-table-badges/). TDBadgedCell was written originally using CGPaths but as more people began to use TDBadgeCell the more customisation people wanted.

To set the content of your badge (NSString) simply do:

cell.badgeString = @"130990";

```Objective-C
cell.badgeString = @"130990";
```

You can set _badgeColor_ and _badgeColorHighlighted_ to modify the colour of the badges:

cell.badgeColor = [UIColor colorWithRed:0.792 green:0.197 blue:0.219 alpha:1.000];

```Objective-C
cell.badgeColor = [UIColor colorWithRed:0.792 green:0.197 blue:0.219 alpha:1.000];
```
You can also specify a border radius for your badges:
cell.badge.radius = 9;
```Objective-C
cell.badge.radius = 9;
```

and you can also turn on shadows for the cells selected state:

cell.showShadow = YES;
```Objective-C
cell.showShadow = YES;
```

Below is an example of those different options enabled in the demo app.

Expand Down

0 comments on commit 8dd1d5a

Please sign in to comment.