uitextview

UITextView inside UITableViewCell - touch go through if not clicking on a link

我是研究僧i 提交于 2021-01-27 06:34:16
问题 I'm trying to have the advantage of the UITextView with Data Detector Types inside a TableViewCell that is itself clickable. The only thing is, I need the UITextView's links to be clickable, so userInteractionEnabled = YES, unfortunately this will prevent any touch going through to the UITableViewCell. Of course the UITextView can't be edited, I also subclassed it refusing it to be first responder to avoid selecting text in it. The only thing I need, is detecting that if a user touch the

UITextView custom spelling and autocorrect

主宰稳场 提交于 2021-01-27 02:56:16
问题 I want to make an iOS text editor for a certain rare human language, and I want it to support my own spell checking and autocorrect systems for that language. In iOS, is it possible to get UITextView to use a custom spell checker and autocorrect system, rather than those of the system's current locale? Or do I have to resort to creating a text view from scratch using Core Text? 回答1: I don’t think there’s a way to actually change the spell-checking mechanism of UITextView . A good approach

Unable to simultaneously satisfy constraints with keyboard and UIToolBar

不问归期 提交于 2021-01-24 07:52:26
问题 I've table view below which I've text view. I'm adding a tool bar above keyboard to show Done button. When I tap on a button in a row to delete the row it shows LayoutConstraints issue as shown below. Following log also shows the flow of event. I can confirm that this issue is related with tool bar, if I remove tool bar then this problem doesn't appear. Similar issue is discussed on https://github.com/hackiftekhar/IQKeyboardManager/issues/1616 I've tried few suggestions from there viz.

Unable to simultaneously satisfy constraints with keyboard and UIToolBar

做~自己de王妃 提交于 2021-01-24 07:52:05
问题 I've table view below which I've text view. I'm adding a tool bar above keyboard to show Done button. When I tap on a button in a row to delete the row it shows LayoutConstraints issue as shown below. Following log also shows the flow of event. I can confirm that this issue is related with tool bar, if I remove tool bar then this problem doesn't appear. Similar issue is discussed on https://github.com/hackiftekhar/IQKeyboardManager/issues/1616 I've tried few suggestions from there viz.

How do I add a custom action to the text selection edit menu in iOS?

房东的猫 提交于 2021-01-16 08:30:53
问题 I need to add a custom action to the edit menu that pops up when a user selects some text in a UITextView in iOS. How do I do this? 回答1: class ViewController: UIViewController, UITextViewDelegate { @IBOutlet weak var textView: UITextView! override func viewDidLoad() { super.viewDidLoad() addCustomMenu() } func addCustomMenu() { let printToConsole = UIMenuItem(title: "Print To Console", action: #selector(printToConsole)) UIMenuController.shared().menuItems = [printToConsole] } func

Delete (not Backspace) doesn't fire UITextViewDelegate's shouldChangeTextInRange

与世无争的帅哥 提交于 2020-12-29 10:11:15
问题 When using an external keyboard, my UITextView fires a shouldChangeTextInRange message just fine when I press the Backspace key ("backward delete"), but if I press Delete ("forward delete") then the method is never called at all, despite the view's text changing as expected. In case it matters, I'm using Swift and the latest iOS simulator. If this is expected behavior, can someone point me to the documentation that explains it? More importantly, is there a workaround? Edit: submitted rdar:/

Delete (not Backspace) doesn't fire UITextViewDelegate's shouldChangeTextInRange

…衆ロ難τιáo~ 提交于 2020-12-29 10:09:44
问题 When using an external keyboard, my UITextView fires a shouldChangeTextInRange message just fine when I press the Backspace key ("backward delete"), but if I press Delete ("forward delete") then the method is never called at all, despite the view's text changing as expected. In case it matters, I'm using Swift and the latest iOS simulator. If this is expected behavior, can someone point me to the documentation that explains it? More importantly, is there a workaround? Edit: submitted rdar:/

Delete (not Backspace) doesn't fire UITextViewDelegate's shouldChangeTextInRange

只愿长相守 提交于 2020-12-29 10:09:28
问题 When using an external keyboard, my UITextView fires a shouldChangeTextInRange message just fine when I press the Backspace key ("backward delete"), but if I press Delete ("forward delete") then the method is never called at all, despite the view's text changing as expected. In case it matters, I'm using Swift and the latest iOS simulator. If this is expected behavior, can someone point me to the documentation that explains it? More importantly, is there a workaround? Edit: submitted rdar:/

Delete (not Backspace) doesn't fire UITextViewDelegate's shouldChangeTextInRange

雨燕双飞 提交于 2020-12-29 10:06:04
问题 When using an external keyboard, my UITextView fires a shouldChangeTextInRange message just fine when I press the Backspace key ("backward delete"), but if I press Delete ("forward delete") then the method is never called at all, despite the view's text changing as expected. In case it matters, I'm using Swift and the latest iOS simulator. If this is expected behavior, can someone point me to the documentation that explains it? More importantly, is there a workaround? Edit: submitted rdar:/

Blank space coming between keyboard and UIVew in iOS

纵然是瞬间 提交于 2020-12-06 05:41:42
问题 I have a tab bar controller-based application and I am using IQKeyboardManager to handle form-like stuff. Step 1: Tab bar controller with bottom a UITextView inside a UIView . Check Image 1. Step2: When I click on UITextView , the keyboard appears but a blank space is appearing due to the tab bar. I have tried to remove IQKeyboardManager but it still occurs, so it is confirmed that it is not the issue of IQKeyboardManager . It is an issue due to the tab bar controller. How to remove that