I created a keyboard using on UITextView
's inputView
.
I want to align the text from the UItextAlignmentRight
but it's not working as it is not calling the UITextViewDelegate
method when using inputView
.
Any help will be appreciated.
I created a keyboard using on UITextView
's inputView
.
I want to align the text from the UItextAlignmentRight
but it's not working as it is not calling the UITextViewDelegate
method when using inputView
.
Any help will be appreciated.
This might be helpful to people who are experiencing problems with setting of textAlignment for UITextView. I experimented with different Unicode directional characters and found that:
When you set textAlignment property of textView to UITextAlignmentRight, right to left adjustment works correctly if you start your text with a strong left to right character. For example:
self.textView.text = [@"\u200e\u202b" stringByAppendingString: yourRtLstring];
If you don't set the textAlignment property of textView (or set to default UITextAlignmentLeft), right to left adjustment works correctly for strong RtL characters.
CHeck if your ViewController is implementing the UITextViewDelegate protocol
Set the UITextAlignment property on the UITextView to UITextAlignmentRight
Which method of UITextViewDelegate are you using?