Skip to content

Commit

Permalink
Added Package.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
tmdvs committed Feb 4, 2017
1 parent df470df commit 43cd454
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
7 changes: 7 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import PackageDescription

let package = Package(name: "TDBadgedCell")

package.targets = [
Target(name: "TDBadgedCell", dependencies: [])
]
2 changes: 1 addition & 1 deletion TDBadgedCell.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'TDBadgedCell'
s.version = '4.0.1'
s.version = '4.0.2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.summary = 'UITableViewCell subclass that adds a "badgeString" property to table view cells.'
s.description = <<-DESC
Expand Down
14 changes: 7 additions & 7 deletions TDBadgedCell/TDBadgedCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import UIKit
class TDBadgedCell: UITableViewCell {

/// Badge value
var badgeString : String = "" {
public var badgeString : String = "" {
didSet {
if(badgeString == "") {
badgeView.removeFromSuperview()
Expand All @@ -27,18 +27,18 @@ class TDBadgedCell: UITableViewCell {
}

/// Badge background color for normal states
var badgeColor : UIColor = UIColor(red: 0, green: 0.478, blue: 1, alpha: 1.0)
public var badgeColor : UIColor = UIColor(red: 0, green: 0.478, blue: 1, alpha: 1.0)
/// Badge background color for highlighted states
var badgeColorHighlighted : UIColor = .darkGray
public var badgeColorHighlighted : UIColor = .darkGray

/// Badge font size
var badgeFontSize : Float = 11.0
public var badgeFontSize : Float = 11.0
/// Badge text color
var badgeTextColor: UIColor?
public var badgeTextColor: UIColor?
/// Corner radius of the badge. Set to 0 for square corners.
var badgeRadius : Float = 20
public var badgeRadius : Float = 20
/// The Badges offset from the right hand side of the Table View Cell
var badgeOffset = CGPoint(x:10, y:0)
public var badgeOffset = CGPoint(x:10, y:0)

/// The Image view that the badge will be rendered into
private let badgeView = UIImageView()
Expand Down

0 comments on commit 43cd454

Please sign in to comment.