1

第一的:

textView.inputAccessoryView = bar;
[textView becomeFirstResponder];

之后:

textView.inputAccessoryView = nil;
[textView reloadInputViews];
[textView resignFirstResponder];
[self.view addSubView:bar];

bar 是 inputAccessoryView。它不会被添加到 self.view。如何实现?

4

1 回答 1

0

请在延迟后添加 inputAccessoryView 视图

textView.inputAccessoryView = nil;
[textView resignFirstResponder];
[self.view performSelector:@selector(addSubview:) withObject:bar afterDelay:1];
于 2014-07-02T10:24:39.937 回答