Permalink
Browse files

Update README.markdown

  • Loading branch information...
1 parent dc7df88 commit 8dd1d5a1e13ea909799ce7b18dc649dd4bd473f8 Tim Davies committed Apr 5, 2012
Showing with 14 additions and 6 deletions.
  1. +14 −6 README.markdown
View
@@ -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.

0 comments on commit 8dd1d5a

Please sign in to comment.