I have a single file named a.caf in the documents directory. I would like to rename it when user types into a UITextField
and presses change (the text entered in the UITextField
should be the new filename).
How can I do this?
I have a single file named a.caf in the documents directory. I would like to rename it when user types into a UITextField
and presses change (the text entered in the UITextField
should be the new filename).
How can I do this?
Worked on Swift 2.2
This is the function by daehan park to converted to Swift 3:
You can use moveItemAtPath.
To keep this question up-to-date, I'm adding the Swift version as well: