jts

JTSCursorMovement

A drop-in utility for adding convenient swipe gesture cursor movements to a UITextView.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

78

Maintenance

Last Commit

5yrs ago

Contributors

2

Package

Dependencies

0

License

MIT

Categories

Readme

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.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100