I have a UIActionsheet with several buttons setup. How would I go about adding a undo function? I’m using UITextfields
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Set the appropriate UIActionSheet button to call the
undomethod on the desired UITextField’sNSUndoManagerobject. For all UITextField and UITextView objects in iOS 3.0 and higher, there is anundoManagerobject that can be accessed and used to manage undoing and redoing of operations. The necessary code would go something like this:(UIActionSheetDelegate method implementation)
EDIT: I suggest you look at the Apple documentation for Undo Managers, it should help you further with this should you need it.