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原生鍵盤?
爲什麼鍵盤不能顯示出來?我錯過重要的東西嗎?