Skip to content

Instantly share code, notes, and snippets.

View BalestraPatrick's full-sized avatar

Patrick Balestra BalestraPatrick

View GitHub Profile
override func viewDidLoad() {
super.viewDidLoad()
dataSource.configureCell = { table, indexPath, user in
let cell = table.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath)
let string = "\(user.screenName) is following \(user.followingCount) users and is followed by \(user.followersCount) users."
cell.textLabel?.text = string
cell.textLabel?.numberOfLines = 0
cell.backgroundColor = indexPath.row % 2 == 0 ? UIColor.whiteColor() : UIColor(red: 0, green: 0, blue: 0, alpha: 0.05)
return cell
let viewModel = ViewModel()
let disposeBag = DisposeBag()

Keybase proof

I hereby claim:

  • I am BalestraPatrick on github.
  • I am balestrapatrick (https://keybase.io/balestrapatrick) on keybase.
  • I have a public key whose fingerprint is E54C 0A34 CE68 E5D0 3458 859A 2A26 C2FA 0AD1 F7C5

To claim this, I am signing this object:

let dictionary: [String: Any] = [
"color": "blue",
"width": 5.0,
]
func XCTAssertEqual(_ l: [String: Any], _ r: [String: Any]) {
l.keys.forEach { key in
if let left = l[key] as? String, let right = r[key] as? String {
XCTAssertEqual(left, right)
} else if let left = l[key] as? CGFloat, let right = r[key] as? CGFloat {