当我想将文本放入我的 UITextField 时,键盘会显示在它的顶部,并覆盖该字段。如何防止这种情况?我刚刚读过:这个解决方案,但我不知道在哪里调整大小?是个好办法吗?
我的代码是:
UITextField * passwordTextField = [[[UITextField alloc] init] autorelease];
passwordTextField.keyboardType = UIKeyboardTypeDefault;
passwordTextField.delegate = self;
passwordTextField.placeholder = NSLocalizedString(@"somestr", @"");
passwordTextField.secureTextEntry = YES;
[_controls setObject:passwordTextField forKey:keyPassword];
然后我通过以下方式在 Three20 中展示它:
...@"",
[NSArray arrayWithObjects:
[TTTableControlItem itemWithCaption:nil control:passwordTextField],
nil],...