0
我需要在UIView上以编程方式添加UITextField。我甚至不需要UITextField可见,只有键盘,因为我打算处理文本字段的其他方面。但是键盘根本不显示。iOS和Sparrow框架上的UITextField
我有这样的:
UITextField* field = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
SPView* view = (SPView*)[SPStage mainStage].nativeView; // I think I don't need this line I believe, since I don't need it visible, but this is my UIView (SPView inherits from UIView)
[view addSubview:field];
[field becomeFirstResponder];
我应该需要什么更多的展现了iOS原生键盘?
为什么键盘不能显示出来?我错过重要的东西吗?