I have a table view with a list of strings as follows:
String1
String2
String3
String4
I want to make one of these the default, i.e., when the user taps “String3”, an alert view should pop up asking if they want to make that item the default.
How would I implement this alert view in my table view controller?
First you’ll want to define an instance variable to keep track of the string that’s currently selected. Something like this in your header file will be fine.
Next, in your tableView:didSelectRowAtIndexPath: delegate method create an alert view.
To save the value after the user taps a button in the alert you should use the UIAlertView delegate.