Open dmiedema opened 9 years ago
I see the problem with the cursor here.
When there is no text, placeholder is taking its place. This moves to cursor to the beginning as in a default UITextField.
I am not sure if there is a way to move the cursor in the placeholder. I am on it...
:+1: I'll update the conflicts in the mean time
I still couldn't find a way to move the cursor to the end when there is no text.
One way seems to set the textAligment
to .Right
temporarily. It moves the cursor to the right, but it also changes the alignment as the name suggests.
Will think about this...
How about something like:
- (UITextPosition *)closestPositionToPoint:(CGPoint)point{
if (!parkedTextAtEnd && text.length == 0) {
UITextPosition *trueBeginning = self.beginningOfDocument;
UITextPosition *betterBeginning = [self positionFromPosition:trueBeginning offset:parkedText.length];
return betterBeginning;
}
}
Note: I haven't tried it being that the project won't compile for me.
Has there been any update on this? Was trying to figure out the caret issue but no luck yet. Very interested in getting this to work with the preceding text
Nope :disappointed: unfortunately i got busy with work and it fell by the wayside.
There's still some bugs with the caret when there is no text which is kinda interesting