inputView 设置用于展示的响应View 类似于键盘的展示方式
inputAccessoryView 用于设置响应View上面的ToolBar
使用方式:
inputView设置为响应View展示在键盘位置
inputAccessoryView 设置键盘上的toolBar
// 创建toolBar
UIToolbar *toolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, getWidth(40))];
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithTitle:LA_BT_ME_DONE style:UIBarButtonItemStylePlain target:self action:@selector(doneTouched:)];
[toolBar setItems:[NSArray arrayWithObjects:[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil], doneButton, nil]];
_pickTextField.inputView = self.selectPickerView;
_pickTextField.inputAccessoryView = toolBar;