[+] Encapsulate UI update closure
This commit is contained in:
@@ -168,3 +168,6 @@ extension String
|
|||||||
return regex.firstMatch(in: lhs, options: [], range: range) != nil
|
return regex.firstMatch(in: lhs, options: [], range: range) != nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// More convenient ui update closure
|
||||||
|
func ui(closure: () -> Void) { DispatchQueue.main.async { closure() } }
|
||||||
|
|||||||
Reference in New Issue
Block a user