[+] Encapsulate UI update closure

This commit is contained in:
Hykilpikonna
2021-01-22 16:27:34 -05:00
parent 45cf2b768e
commit e53cc408e2
+3
View File
@@ -168,3 +168,6 @@ extension String
return regex.firstMatch(in: lhs, options: [], range: range) != nil
}
}
/// More convenient ui update closure
func ui(closure: () -> Void) { DispatchQueue.main.async { closure() } }