【发布时间】:2014-03-21 07:03:41
【问题描述】:
我正在开发一个 iPhone 应用程序。我的ViewController 上有一个简单的UITableView。在UITableView 中,我在单元格中添加了UITextField。我的问题是当我单击特定单元格中的UITextField 时,键盘会隐藏整个UITableView。我已经搜索过它,但无法成功找到解决方案。我像这样添加UITextField:
UITextField* textField = [[UITextField alloc]initWithFrame:CGRectMake(250, 15, 60, 30)];
textField.delegate = self;
textField.borderStyle = UITextBorderStyleRoundedRect;
textField.autocorrectionType = UITextAutocorrectionTypeNo;
textField.backgroundColor = [UIColor clearColor];
textField.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
textField.tag =TEXT_VIEW_TAG;
[cell.contentView addSubview:textField];
如果有人知道它的解决方案,请告诉我。
【问题讨论】:
-
请提供您的表格视图数据源和委托方法的代码,以便更深入地了解您的问题。
标签: ios iphone objective-c uitableview storyboard