How do I add a input field to my layer, that pops up the keyboard when clicked?
How do I add a simple input field?
(8 posts) (4 voices)-
Posted 2 years ago #
-
I think that the only way is to add a UIKit texfield on the view unfortunately.
Posted 2 years ago # -
How do I get hold on the view from my layer?
Posted 2 years ago # -
I am sorry for not directly helping you, but I am just comparing my way of learning Cocos2D with yours...
1) I first try to figure out something by myself, then if fail
2) I try searching the forum and looking into the word clouds on the left, then if I fail
3) I try looking into the Cocos2D Documentation (tips especially), then if I fail
4) I again search the forum with altered search terms, then if I fail
5) I search Google, then if I fail again (which is pretty much impossible with simple question like yours)
6) then and just then I ask question on the forum.Well, your question can be answered in all of those first 5 lines. Don't take it too personally, but when people ask same questions again and again they just show a little disrespect for people that really like to help others, and they have to loose their time answering repetitive questions...
Take care
Posted 2 years ago # -
@neigaard, try Crmagicxxx option #3! Check the "Documentation" link at the top of this page. If you search in addition to "cocos2d" use the keywords "UIKit" and "UIView" as well as "textfield" and "UITextField".
You can also find a tag cloud here:
http://www.cocos2d-iphone.org/forum/tags/also, you can get cocos' view from Director:
[Director sharedDirector] openglView]
which returns a UIView that you can use to add you own views to, if you want to do it that way.happy searching!
Posted 2 years ago # -
You're too kind sometimes. I was helping him by teaching him how to help himself. There is a whole info on this subject here http://www.cocos2d-iphone.org/wiki/doku.php/tips:cocos2d_and_uikitlayer except he needs to implement it to UITextField...
Posted 2 years ago # -
@crmagicxxx - I added my hints bc many newcomers to cocos and cocoa wont know that a textfield is part of the UIKit, and you really need to search for UIKit to get good results. I did appreciate that you are teaching someone to fish vs giving someone a fish. I just maybe gave a bigger nudge in the right direction ;)
Posted 2 years ago # -
I agree with crmagicxxx, sorry to ask for to many simple problems. Its just that I spend a lot of time figuring out a lot of things, and then sometimes when there is a simple thing that is bugging me to much, I have a weakness to ask for help on it, as many times the simple things takes a second to answer for someone who knows it. I will try to fight this flaw of mine ;)
Posted 2 years ago #
Reply
You must log in to post.