If you want to add a UITextfield to a UIActionsheet in ios development, you can not just directly add the textfield to the actionsheet.
If you just add a textfield to actionsheet, you can not type any words in the textfield. It seems like some methods in textfield is not working properly.
So is it any way to add the textfield to actionsheet? The answer is yes.
Thanks to the following answer:
http://stackoverflow.com/questions/4367494/keypad-not-working-for-textfield-in-uiactionsheet
we can successfully add a textfield in actionsheet. The idea is show the actionsheet first, and then add the textfield above the actionsheet.
I just dont want to go through the detail. I have add the code to github. If you are looking for the solution about this. You can download it freely.
Here is the link:
https://github.com/fisherv1/actionsheetWithTextFiled.git
Here is what it looks like:
No comments:
Post a Comment