【发布时间】:2015-07-12 02:14:14
【问题描述】:
我有两个文本视图作为带有inputAccessoryView 的 UITableView 的子视图,一个不可编辑,但我仍然希望允许人们突出显示和使用(复制 | 定义)另一个在 @987654322 内@。
问题是当突出显示不可编辑的 textView 时,出现输入附件视图...(为什么!?)好像 tableView 突然成为第一响应者,我猜是因为它的一个子视图已成为第一响应者.问题是,我是否需要将这个不可编辑的 textView 从 tableViews 子视图中取出,或者有什么方法可以抑制 inputAccessoryView 在突出显示时弹出?后者是首选。
-(UITextView *)textView
{
if (!_textView) {
_textView = [[UITextView alloc]initWithFrame:CGRectZero];
//_textView.delegate = self;
_textView.font = [UIFont questionDemiBoldFontOfSize:36.0f];
_textView.backgroundColor = [UIColor clearColor];
_textView.editable = NO;
_textView.scrollEnabled = NO;
_textView.textColor = [UIColor whiteColor];
_textView.tintColor = [UIColor whiteColor];
_textView.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin;
}
return _textView;
}
【问题讨论】:
-
你能解决这个问题吗?以下两种解决方案都不适合我。
-
return nil;有问题的 textView 确实对我有用。抱歉,如果这不是您的有效解决方案..
标签: ios objective-c uitableview uitextview inputaccessoryview