Giter Site home page Giter Site logo

andriariii / tdbadgedcell Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tmdvs/tdbadgedcell

0.0 2.0 0.0 2.61 MB

TDBadgedCell is a UITableViewCell subclass that adds badges, to table view cells. It's highly customisable, allowing you to alter the badge colours, shape, and positioning.

Home Page: www.tmdvs.me/TDBadgedCell

tdbadgedcell's Introduction

TDBadgedCell

Meet TDBadgedCell version 2

TDBadgedCell grew out of the need for TableViewCell badges and the lack of them in iOS (see the article explaining this on TUAW. TDBadgedCell was written originally using CGPaths but as more people began to use TDBadgeCell the more customisation people wanted. The class works in both ARC and non-ARC projects automatically (thanks coryallegory).

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

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];

You can also specify a border radius and font size for your badges:

cell.badge.radius = 9;
cell.badge.fontSize = 18;

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

cell.showShadow = YES;

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

Example Image

Licence and that stuff

TDBadgedCell is a free to use class for everyone. I wrote it so people could have the badges Apple never provided us with. If you modify the source please share alike and if you think you've improved upon what I have written I recomend sending me a pull request.

Please note: If you are using TDBadgedCell in your project please make sure you leave credit where credit is due. Chances are I won't notice if you haven't left credit but karma will…

tdbadgedcell's People

Contributors

coryallegory avatar julientherier avatar jkubicek avatar ryanmasondavies avatar danielebogo avatar exalted avatar andruu avatar frisocki avatar tchaikov avatar tonymillion avatar valeriomazzeo avatar kishikawakatsumi avatar vtourraine avatar

Watchers

James Cloos avatar Andri Ari Pratama avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.