All Projects → tmdvs → Tdbadgedcell

tmdvs / Tdbadgedcell

Licence: mit
TDBadgedCell is a table view cell class that adds a badge, similar to the badges in Apple's own apps

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Tdbadgedcell

Swipecellkit
A swipeable UITableViewCell or UICollectionViewCell with support for:
Stars: ✭ 5,745 (+297.85%)
Mutual labels:  uitableview, tableview, uitableviewcell
Aiforms.settingsview
SettingsView for Xamarin.Forms
Stars: ✭ 274 (-81.02%)
Mutual labels:  uitableview, tableview
SNAdapter
iOS swift tableview and collectionView Adapter
Stars: ✭ 35 (-97.58%)
Mutual labels:  tableview, tableviewcell
Ezplayer
基于AVPlayer封装的视频播放器,功能丰富,快速集成,可定制性强,支持react-native。
Stars: ✭ 377 (-73.89%)
Mutual labels:  uitableview, tableview
WBChainMenu
This will show horizontal menu to a UITableViewCell with chain animation
Stars: ✭ 28 (-98.06%)
Mutual labels:  uitableview, uitableviewcell
android-tableview-kotlin
Android's missing TableView component.
Stars: ✭ 40 (-97.23%)
Mutual labels:  tableview, tableviewcell
Uitableviewdynamiclayoutcacheheight
🖖高性能的自动计算采用 Autolayout 布局的 UITableViewCell 和 UITableViewHeaderFooterView 的高度,内部自动管理高度缓存。
Stars: ✭ 360 (-75.07%)
Mutual labels:  uitableview, uitableviewcell
UITableViewCellAnimation
Basic tabeview cell animation for best way to display cell
Stars: ✭ 31 (-97.85%)
Mutual labels:  uitableview, uitableviewcell
Gltablecollectionview
Netflix and App Store like UITableView with UICollectionView, written in pure Swift 4.2
Stars: ✭ 709 (-50.9%)
Mutual labels:  uitableview, uitableviewcell
Tablekit
Type-safe declarative table views.
Stars: ✭ 567 (-60.73%)
Mutual labels:  uitableview, uitableviewcell
Datasource
Simplifies the setup of UITableView data sources using type-safe descriptors for cells and sections. Animated diffing built-in.
Stars: ✭ 72 (-95.01%)
Mutual labels:  uitableview, uitableviewcell
Mdl11 generics
Example project that was demonstrated on MDL #11 meetup - https://www.youtube.com/watch?v=A4FrEyFBjVA. Medium article - https://medium.com/chili-labs/configuring-multiple-cells-with-generics-in-swift-dcd5e209ba16
Stars: ✭ 50 (-96.54%)
Mutual labels:  uitableview, uitableviewcell
UnityTableView
Plugin for Unity 5.6 that implements a Table with an API inspired by Apple's UITableView
Stars: ✭ 27 (-98.13%)
Mutual labels:  uitableviewcell, tableview
tcscustomrowactionfactory
TCSTableViewRowActionFactory allows you to setup the swipe actions for cells in a table view using UIView and some other convenient methods
Stars: ✭ 24 (-98.34%)
Mutual labels:  uitableviewcell, tableview
TableViewKit
Empowering UITableView with painless multi-type cell support and built-in automatic state transition animations
Stars: ✭ 105 (-92.73%)
Mutual labels:  uitableview, uitableviewcell
React Native Tableview Simple
Flexible and lightweight React Native component for UITableView made with pure CSS
Stars: ✭ 357 (-75.28%)
Mutual labels:  uitableview, tableview
ReactiveDataDisplayManager
No description or website provided.
Stars: ✭ 35 (-97.58%)
Mutual labels:  tableview, tableviewcell
TableViewExtension
This extension simplify registering any cell, reusing and other verbosity steps.
Stars: ✭ 13 (-99.1%)
Mutual labels:  tableview, tableviewcell
Flow
Declarative approach to populate and manage UITableViews (see https://github.com/malcommac/FlowKit)
Stars: ✭ 421 (-70.84%)
Mutual labels:  uitableview, tableview
React Native Ezplayer
EZPlayer component for react-native apps
Stars: ✭ 47 (-96.75%)
Mutual labels:  uitableview, tableview

TDBadgedCell

Version Carthage compatible Platform License Downloads

TDBadgedCell grew out of the need for TableViewCell badges and the lack of them in iOS (see the article explaining this on TUAW Engadget). Recently the project has been re-written in Swift and much simplified.

 

Usage and examples

TDBadgedCell is designed to be a drop in replacement to UITableViewCell with the added benifit of a simple badge on the right hand side of the cell, similar to those you'll find in Mail.app and Settings.app. All you need to do to implement TDBadgedCell is supply a TDBadgedCell instance in your cellForRowAt indexPath: method:

override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  var cell = tableView.dequeueReusableCell(withIdentifier:"BadgedCell") as? TDBadgedCell;
  if(cell == nil) {
    cell = TDBadgedCell(style: .default, reuseIdentifier: "BadgedCell");
  }

  // ...
  
  return cell!
}

You can modify the badges appearance in a number of different ways.

  • Setting badge value

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

    cell.badgeString = "Hello, World!"
  • Changing the badge color

    You can set badgeColor and badgeColorHighlighted to modify the colour of the badges:

    cell.badgeColor = .orange
    cell.badgeColorHighlighted = .green
  • Setting the font size and text color

    By default the badge text will be clipped out of the badge background allowing you to see through to the background colour beneath. However you can specify a text color manually along with the badges font size:

    cell.badgeTextColor = .black;
    cell.badgeFontSize = 18;
  • Corner radius

    You can modify the badges corner radius allowing you to change the badges shape from the default "pill" shape to a square or rounded rectangle:

    cell.badgeRadius = 0;
  • Badge Offset

    You can set the badge's offset from the right hand side of the Table View Cell

    cell.badgeOffset = CGPoint(x:10.0, y:0)
  • Badge Text Offset

    You can add an offset to the text within the badge

    cell.badgeTextOffset = 5.0

If you have any feedback or feature requests, simply open an issue on the TDBadgedCell github repo.

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 recommend 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…

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].