我在 CCLayer 的“init”方法中编写了这段代码:
//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 不可见?