<commit_before># ASJExpandableTextView

UITextView's most obvious omission is the ability to set placeholder text. This class fixes that and provides more. You can make the text view expand and contract according to its content and have a "Done" button over the keyboard to hide it.

![alt tag](Images/Screenshot.png)

# Installation

CocoaPods is the preferred way to install this library. Add this command to your `Podfile`:

```
pod 'ASJExpandableTextView'
```

# Usage

Creating an ASJExpandableTextView is easy. It has a simple interface consisting of four properties which are IBInspectable. This means that they can be set using the interface builder of your choice; Xibs or Storyboards.

```
@property (nullable, copy, nonatomic) IBInspectable NSString *placeholder;
```
Sets the placeholder. Visible when there is nothing typed in the text view.

```
@property (assign, nonatomic) IBInspectable BOOL isExpandable;
```
Set this to make the text view expand and contract according to its content.

```
@property (assign, nonatomic) IBInspectable NSUInteger maximumLineCount;
```
You can set the number of visible lines of the text view. Default is 4. To use this property, `isExpandable` must be set to `YES`.

```
@property (assign, nonatomic) IBInspectable BOOL shouldShowDoneButtonOverKeyboard;
```
The "return" key on the keyboard for a `UITextView` brings a new line, unlike a `UITextField` where the keyboard gets hidden. Set this property to show a "Done" button over the keyboard which can hide the keyboard.

```
@property (nullable, copy) DoneTappedBlock doneTappedBlock;
```
You can handle the event of the keyboard getting hidden using this block. To use this property, `shouldShowDoneButtonOverKeyboard` must be set to `YES`.

![alt tag](Images/IBInspectable.png)

You can create one using just the interface builder, drop in a UITextView and change the class to `ASJExpandableTextView`.

![alt tag](Images/CustomClass.png)

###Thanks

- To [<NAME>](https://github.com/Abhijit-Kayande) for fixing the choppy animation
- To [devxoul](https://github.com/devxoul/UITextView-Placeholder) for placeholder label position fix

# License

ASJExpandableTextView is available under the MIT license. See the LICENSE file for more info.<commit_msg>formatting<commit_after># ASJExpandableTextView

`UITextView`'s most obvious omission is the ability to set placeholder text. This class fixes that and provides more. You can make the text view expand and contract according to its content and have a "Done" button over the keyboard to hide it.

![alt tag](Images/Screenshot.png)

# Installation

CocoaPods is the preferred way to install this library. Add this command to your `Podfile`:

```
pod 'ASJExpandableTextView'
```

# Usage

Creating an `ASJExpandableTextView` is easy. It has a simple interface consisting of four properties which are `IBInspectable`. This means that they can be set using the interface builder of your choice; Xibs or Storyboards.

```
@property (nullable, copy, nonatomic) IBInspectable NSString *placeholder;
```
Sets the placeholder. Visible when there is nothing typed in the text view.

```
@property (assign, nonatomic) IBInspectable BOOL isExpandable;
```
Set this to make the text view expand and contract according to its content.

```
@property (assign, nonatomic) IBInspectable NSUInteger maximumLineCount;
```
You can set the number of visible lines of the text view. Default is 4. To use this property, `isExpandable` must be set to `YES`.

```
@property (assign, nonatomic) IBInspectable BOOL shouldShowDoneButtonOverKeyboard;
```
The "return" key on the keyboard for a `UITextView` brings a new line, unlike a `UITextField` where the keyboard gets hidden. Set this property to show a "Done" button over the keyboard which can hide the keyboard.

```
@property (nullable, copy) DoneTappedBlock doneTappedBlock;
```
You can handle the event of the keyboard getting hidden using this block. To use this property, `shouldShowDoneButtonOverKeyboard` must be set to `YES`.

![alt tag](Images/IBInspectable.png)

You can create one using just the interface builder, drop in a `UITextView` and change the class to `ASJExpandableTextView`.

![alt tag](Images/CustomClass.png)

###Thanks

- To [<NAME>](https://github.com/Abhijit-Kayande) for fixing the choppy animation
- To [devxoul](https://github.com/devxoul/UITextView-Placeholder) for placeholder label position fix

# License

`ASJExpandableTextView` is available under the MIT license. See the LICENSE file for more info.
{'fraction_non_alphanumeric': 0.07745076344323966, 'fraction_numerical': 0.0004425757911042266, 'mean_word_length': 5.132971506105834, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5571496', 'n_tokens_mistral': 1299, 'n_tokens_neox': 1218, 'n_words': 587}