Latest 1.1.0
Homepage https://github.com/jaredsinclair/JTSCursorMovement
License MIT
Platforms ios 7.0, requires ARC
Frameworks UIKit
Authors

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.

Latest podspec

{
    "name": "JTSCursorMovement",
    "version": "1.1.0",
    "summary": "A drop-in utility for adding convenient swipe gesture cursor movements to a UITextView.",
    "homepage": "https://github.com/jaredsinclair/JTSCursorMovement",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Jared Sinclair": "https://twitter.com/jaredsinclair"
    },
    "source": {
        "git": "https://github.com/jaredsinclair/JTSCursorMovement.git",
        "tag": "1.1.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "frameworks": "UIKit",
    "compiler_flags": "-fmodules",
    "source_files": [
        "Source/*.{h,m}"
    ]
}

Pin It on Pinterest

Share This