- 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.
NTYSmartTextView is available through CocoaPods, to install it simply add the following line to your Podfile:
platform :osx
pod "NTYSmartTextView"
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.
self.textView.smartIndentEnabled = NO;
self.textView.softTabEnabled = NO;
// You also can change the width of soft tab from 4.
self.textView.tabWidth = 2;
self.textView.autoPairCompletionEnabled = NO;