Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var micHintWorkItem: DispatchWorkItem?
func recordVoiceMessage() {
//in your viewDidAppear method, create and schedule the work item:
micHintWorkItem = DispatchWorkItem { [weak self] in
//we just created the work item, it is safe to force unwrap in this situation
DispatchQueue.main.asyncAfter(.now() + 3, execute: micHintWorkItem!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.