我正在開發一個iPhone應用程序。我在我的ViewController
上有一個簡單的UITableView
。在UITableView
中,我在單元格中添加UITextField
。我的問題是當我點擊特定單元中的UITextField
時,鍵盤隱藏了整個UITableView
。我已經搜索過它,但無法成功找到解決方案。我加入UITextField
這樣的:鍵盤隱藏StoryBoard中的UITableView
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];
如果有人知道它的解決方案,那麼請讓我知道。
請提供您的表視圖數據源和委託方法的代碼,以更深入地瞭解您的問題。 –