JTSCursorMovement
A drop-in utility for adding convenient swipe gesture cursor movements to a UITextView.
Install / Use
/learn @jaredsinclair/JTSCursorMovementREADME
JTSCursorMovement
A drop-in utility for adding convenient swipe gesture cursor movements to a UITextView.
Moving the Cursor
JTSCursorMovement adds convenient gesture recognizers to a UITextView that make it easy to move the cursor forward or backwards. Use one finger to move by characters, two fingers by words, and three fingers by paragraphs. JTSCursorMovement works with all of the following:
- plain text
- attributed text
- composed characters like emoji.
- both right-to-left and left-to-right languages
Usage
Setting up JTSCursorMovement is easy: an import, a strong reference, and a one-line initializer.
#import "JTSCursorMovement.h"
@interface BLAViewController ()
@property (strong, nonatomic) JTSCursorMovement *cursorMovement;
@property (strong, nonatomic) UITextView *textView;
@end
[...]
- (void)viewDidLoad {
[super viewDidLoad];
self.cursorMovement = [[JTSCursorMovement alloc] initWithTextView:self.textView];
}
That's it.
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
