screen recorder swift
func stopRecording() {
recorder.stopRecording { [unowned self] (preview, error) in
print("Stopped recording")
guard preview != nil else {
print("Preview controller is not available.")
return
}
let alert = UIAlertController(title: "Recording Finished", message: "Would you like to edit or delete your recording?", preferredStyle: .alert)
let deleteAction = UIAlertAction(title: "Delete", style: .destructive, handler: { (action: UIAlertAction) in
self.recorder.discardRecording(handler: { () -> Void in
print("Recording suffessfully deleted.")
})
})
let editAction = UIAlertAction(title: "Edit", style: .default, handler: { (action: UIAlertAction) -> Void in
preview?.previewControllerDelegate = self
self.present(preview!, animated: true, completion: nil)
})
alert.addAction(editAction)
alert.addAction(deleteAction)
self.present(alert, animated: true, completion: nil)
self.isRecording = false
self.viewReset()
}
}
Also in Swift:
- swift dictionary get key from valye
- loop through array swift
- parse int in swift
- how can i find range of a string in another string swift
- swift animate a label ishidden
- detect binding valu change swiftui
- swift reload tableviewcell at index
- how to swift pie chart quartzcore framework
- how to screen record swift stackoverflow
- Close iOS Keyboard by touching anywhere using Swift
- how to use alamofire pod in swift 5
- xcode enable a button after a text field is filled
- swift VStack
- swift session.input
- How to create a Swift Date object
- how to delete from list tvos swiftui coredata
- screen recorder swift
- declare empty string in swift
- create protocol swift
- swift find difference between two arrays
- int in swift
- swift double v float
- cross origin requests are only supported for http wkwebview
- list header swiftui