Skip to content

Instantly share code, notes, and snippets.

View barefeettom's full-sized avatar

Tom Brodhurst-Hill barefeettom

View GitHub Profile
@barefeettom
barefeettom / NewsTableViewCell.swift
Last active December 22, 2018 10:46
NewsTableViewCell import BFWControls
import UIKit
import BFWControls
class NewsTableViewCell: UITableViewCell {
}
@barefeettom
barefeettom / NewsTableViewCell.swift
Created December 22, 2018 11:05
NewsTableViewCell subclass of NibTableViewCell
import UIKit
import BFWControls
class NewsTableViewCell: NibTableViewCell {
}
@barefeettom
barefeettom / NewsTableViewCell.swift
Created December 22, 2018 11:19
NewsTableViewCell IBDesignable
import UIKit
import BFWControls
@IBDesignable class NewsTableViewCell: NibTableViewCell {
}
import UIKit
import BFWControls
@IBDesignable class NewsTableViewCell: NibTableViewCell {
@IBOutlet weak var detailImageView: UIImageView!
@IBInspectable var detailImage: UIImage? {
get {
return detailImageView.image
import UIKit
import BFWControls
@IBDesignable class ProductTableViewCell: NibTableViewCell {
}
import UIKit
import BFWControls
@IBDesignable class RightChatTableViewCell: NibTableViewCell {
}
import UIKit
import BFWControls
@IBDesignable class LeftChatTableViewCell: NibTableViewCell {
}
@barefeettom
barefeettom / CustomView.swift
Created February 3, 2019 00:40
CustomView IBOutlets
import UIKit
@IBDesignable class CustomView: UIView {
@IBOutlet weak var textLabel: UILabel!
@IBOutlet weak var slider: UISlider!
}
@barefeettom
barefeettom / DodgyNib.swift
Created February 3, 2019 05:59
A dodgy though common way to embed a xib
guard let contentView = Bundle(for: self)
.loadNibNamed(String(describing: self), owner: self, options: nil)
.first as? UIView
else { return }
self.addSubview(contentView)
addConstraintsToPinToTheSuperview(contentView)
@barefeettom
barefeettom / CustomView.swift
Created February 3, 2019 06:03
CustomView subclass of UIView
import UIKit
class CustomView: UIView {
}