Skip to content

Instantly share code, notes, and snippets.

View samirGuerdah's full-sized avatar

Samir Guerdah samirGuerdah

View GitHub Profile
@joshavant
joshavant / UIView+Utility.swift
Created November 17, 2018 07:40
Ambiguity Treadmill
extension UIView {
@objc func exerciseAmbiguityInLayoutRepeatedly() {
if self.hasAmbiguousLayout {
Timer.scheduledTimer(timeInterval: 0.5,
target: self,
selector: #selector(UIView.exerciseAmbiguityInLayout),
userInfo: nil,
repeats: true)
}
}
@AliSoftware
AliSoftware / Coordinators-v2.swift
Last active May 4, 2023 12:26
Our implementation of the Coordinators pattern — V2, more strict than V1
// Coordinator.swift
import Foundation
public protocol Coordinator: class {
var components: CoordinatorComponents { get }
/// Set up here everything that needs to happen just before the Coordinator is presented
///
/// - Parameter modalSetup: A parameter you can use to customize the default mainViewController's
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing