Created
February 14, 2021 07:45
-
-
Save thatswiftguy/a38bb700165ccb035376d30d0eb57856 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func deleteRecording(url : URL){ | |
do { | |
try FileManager.default.removeItem(at : url) | |
} catch { | |
print("Can't delete") | |
} | |
for i in 0..<recordingsList.count { | |
if recordingsList[i].fileURL == url { | |
if recordingsList[i].isPlaying == true { | |
stopPlaying(url: recordingsList[i].fileURL) | |
} | |
recordingsList.remove(at : i) | |
break | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment