Skip to content

Instantly share code, notes, and snippets.

View aessam's full-sized avatar
:octocat:
Doing code pushups

Ahmed Essam aessam

:octocat:
Doing code pushups
View GitHub Profile
@kastiglione
kastiglione / helpers.swift
Last active June 2, 2022 02:02
Swift helpers, and the lldb setup to use them. Presented @ SLUG https://speakerdeck.com/kastiglione/advanced-debugging-and-swift
extension UIView {
/// Example: call someView.nudge(0, 30)
func nudge(_ dx: CGFloat, _ dy: CGFloat) {
self.frame = self.frame.offsetBy(dx: dx, dy: dy)
CATransaction.flush()
}
}
extension UIView {
/// Example: po UIView.root