第一
textView.inputAccessoryView = bar;
[textView becomeFirstResponder];
后:
textView.inputAccessoryView = nil;
[textView reloadInputViews];
[textView resignFirstResponder];
[self.view addSubView:bar];
bar是inputAccessoryView。它不会被添加到self.view中。如何实现呢?
答案 0 :(得分:0)
请在延迟后添加inputAccessoryView视图,如
textView.inputAccessoryView = nil;
[textView resignFirstResponder];
[self.view performSelector:@selector(addSubview:) withObject:bar afterDelay:1];