Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/naoty/ntysmarttextview
NSTextView with smart features
https://github.com/naoty/ntysmarttextview
Last synced: 2 months ago
JSON representation
NSTextView with smart features
- Host: GitHub
- URL: https://github.com/naoty/ntysmarttextview
- Owner: naoty
- License: mit
- Created: 2014-03-25T13:07:10.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-03-28T10:07:53.000Z (over 10 years ago)
- Last Synced: 2024-09-17T11:02:46.664Z (3 months ago)
- Language: Objective-C
- Size: 582 KB
- Stars: 27
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# NTYSmartTextView
[![Version](http://cocoapod-badges.herokuapp.com/v/NTYSmartTextView/badge.png)](http://cocoadocs.org/docsets/NTYSmartTextView)
[![Platform](http://cocoapod-badges.herokuapp.com/p/NTYSmartTextView/badge.png)](http://cocoadocs.org/docsets/NTYSmartTextView)![Screenshot](./screenshot.gif)
## Features
- Smart indent: Keep the width of indent when breaking line.
- Soft tab: Input spaces instead of tabs by entering TAB key.
- Auto pair completion: Automatically complete closing braces and quotes.## Installation
NTYSmartTextView is available through [CocoaPods](http://cocoapods.org), to install
it simply add the following line to your Podfile:```rb
platform :osx
pod "NTYSmartTextView"
```## Usage
At Xib, set the custom view of a text view to `NTYSmartTextView`. By default, above features is enabled. If you want to change th default configurations, change properties as follows.
### Smart indent
```objective-c
self.textView.smartIndentEnabled = NO;
```### Soft tab
```objective-c
self.textView.softTabEnabled = NO;// You also can change the width of soft tab from 4.
self.textView.tabWidth = 2;
```### Auto pair completion
```objective-c
self.textView.autoPairCompletionEnabled = NO;
```