我很难用谷歌搜索这个,因为我不确定该怎么调用它,但这是一张截图。
问题是我有一个大字体大小的用户可编辑 UITextView。我正在这样创建和添加它:
UITextView *textView1 = [[UITextView alloc] initWithFrame:(CGRect){0,0,700,200}];
textView1.text = @"THANK YOU";
textView1.font = [UIFont fontWithName:@"HelveticaNeue-CondensedBold" size:95.0];
textView1.textColor = [UIColor whiteColor];
textView1.backgroundColor = [UIColor clearColor];
textView1.textAlignment = NSTextAlignmentCenter;
[self.innerContainerView addSubview:textView1];
[textView1 sizeToFit];
textView1.frame = CGRectInset(textView1.frame, -20, 0);
textView1.center = (CGPoint){self.innerContainerView.frame.size.width / 2, self.innerContainerView.frame.size.height / 2};
textView1.delegate = self;
在用户选择特定字符范围之前,一切正常。拖动选择句柄时会出现这个(大部分)空插入符号。看起来这通常会向您显示所选文本的稍微放大的预览,但在这里它是无用且丑陋的。有没有办法禁用此工具?它甚至叫什么?
最佳答案
试试这个:
yourTextView.autocorrectionType = UITextAutocorrectionTypeNo;
关于ios - 在 UITextView 上隐藏 "Selection Preview"插入符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22773031/