Skip to content

Instantly share code, notes, and snippets.

@iamjason
Created December 16, 2014 20:39
Show Gist options
  • Select an option

  • Save iamjason/4461841615c0eeaecfe4 to your computer and use it in GitHub Desktop.

Select an option

Save iamjason/4461841615c0eeaecfe4 to your computer and use it in GitHub Desktop.

Revisions

  1. iamjason created this gist Dec 16, 2014.
    38 changes: 38 additions & 0 deletions JGCell.swift
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@

    class JGCell : UITableViewCell {

    override init(style: UITableViewCellStyle, reuseIdentifier: String!) {
    super.init(style: style, reuseIdentifier: reuseIdentifier)
    setupViews()
    }

    required init(coder aDecoder: NSCoder) {
    super.init(coder: aDecoder)
    setupViews()
    }

    override func awakeFromNib() {
    setupViews()
    }

    class var cellReuseIdentifier:String {
    get {
    return NSStringFromClass(self)
    }
    }

    class func registerTableView(tableView:UITableView){
    tableView.registerClass(self, forCellReuseIdentifier: cellReuseIdentifier)
    }

    class func cellWithTableView(tableView:UITableView, indexPath:NSIndexPath) -> JGCell {

    return tableView.dequeueReusableCellWithIdentifier(cellReuseIdentifier, forIndexPath: indexPath) as JGCell
    }

    func setupViews() {

    }


    }