I'm developing a game where results are shown to user in UIAlertView and users can share the results. Is there any way to "lock" the text that application provides so that users cannot cheat and change their results.
Asked
Active
Viewed 161 times
1 Answers
0
Assuming the results are in a UITextView or UITextField, you can set the field's userInteractionEnabled
parameter to NO
to not allow the user to change the text.
EDIT: When I made this post I didnt really look at the title, so I thought you were creating the UIAlertView on your own. Looking more into it, I could not find a way do disable editing of the text fields. I believe that this was done on purpose by apple, it may be possible that there is no way to do this or that the only way is through a very roundabout hack.

Jsdodgers
- 5,253
- 2
- 20
- 36
-
Well, they aren't. They are visible to the user only in UIAlertView (which cannot be edited), but when they share via UIActivityViewController, the text that is already set via method in my app can be edited. For example, alert view says that 4 out of 6 were correct. Now, I want to share it, I click Share and then lets say Facebook. In there, I could change the text to 6 out of 6 were correct if I wanted to. This is what I need to prevent – imas145 Jul 28 '13 at 12:06