0
我寫這段代碼在我CCLayer的 「初始化」 方法:的UITextField在cocos2d
//textField
UITextField *tf = [[[UITextField alloc] init] autorelease];
tf.borderStyle = UITextBorderStyleRoundedRect;
CCUIWrapper *tfwrapper = [CCUIWrapper wrapperForUIView:tf];
tfwrapper.anchorPoint = ccp(0, 0);
tfwrapper.contentSize = CGSizeMake(100, 20);
tfwrapper.position = ccp(100, 100);
[self addChild:tfwrapper];
爲什麼不可見的UITextField?
嘗試使用initWithFrame:UITextField的方法而不是簡單的init。 – Morion
同樣的事情...什麼都沒有... –
你設置了什麼框架? – Morion