Skip to content

Instantly share code, notes, and snippets.

@jlalvarez18
jlalvarez18 / deepDescription.swift
Last active June 4, 2022 12:12 — forked from mhuusko5/Swift – func deepDescription
Swift 4 – func deepDescription(any: Any) -> String (pretty print any object, recursively)
func deepDescription(_ any: Any) -> String {
guard let any = deepUnwrap(any) else {
return "nil"
}
if any is Void {
return "Void"
}
if let int = any as? Int {
@jlalvarez18
jlalvarez18 / gist:123f9827a0e7f75a8e08
Last active August 29, 2015 14:24
Swift Dynamic UITableView Header View
override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)
self.layoutHeaderView(size.width)
}
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
self.layoutHeaderView(self.tableView.bounds.width)
}
Verifying that +jlalvarez18 is my openname (Bitcoin username). https://onename.com/jlalvarez18
@jlalvarez18
jlalvarez18 / keybase.md
Created January 20, 2015 01:16
Keybase.io Proof

Keybase proof

I hereby claim:

  • I am jlalvarez18 on github.
  • I am jlalvarez18 (https://keybase.io/jlalvarez18) on keybase.
  • I have a public key whose fingerprint is 972B F3A5 607F 9150 D1CB FA40 1C1B 739B C581 6FD5

To claim this, I am signing this object: