Skip to content

Commit 45b27bd

Browse files
author
Kyle Begeman
committed
Merge branch 'master' of github.com:kylebegeman/InlineTagController
2 parents 1890004 + 7618d97 commit 45b27bd

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This class is a direct copy of TFBubbleItUp https://github.com/thefuntasty/TFBub
2020

2121
![TagValidation](https://user-images.githubusercontent.com/1012880/28084776-8fa44ee6-662e-11e7-9cb5-3e0760725f70.GIF)
2222

23-
## Usage
23+
# Usage
2424
### Setup
2525

2626
Add a UIView as a subview and set its class to `InputTagController` in the identity inspector. Provide position constraints and omit a height constraint. Open the Size inspector and set `Intrinsic Size` to `Placeholder`. InputTagController will resize to fit its content.
@@ -84,6 +84,17 @@ InlineTagControllerConfiguration.numberOfTags = .quantity(3)
8484

8585
When the tag limit is reached, the text fields will no longer activate when tapping the view. Instead, the last tag will transition to the **edit** state. Setting to **.unlimited** will auto-resize the view based on the intrinsic content size.
8686

87+
### Delegates
88+
89+
Similar to any text field, **InlineTagControllerDelegate** gives you access to the real time text while typing new tags, and each final tag once created (will not be called if validation fails)
90+
91+
```swift
92+
public protocol InlineTagControllerDelegate: class {
93+
func inlineTagController(_ controller: InlineTagController, didFinishEditing text: String)
94+
func inlineTagController(_ controller: InlineTagController, didChange text: String)
95+
}
96+
```
97+
8798
### Configuration
8899

89100
InlineTagController can be fully customized with the **InlineTagControllerConfiguration** class. Below are all available properties:

0 commit comments

Comments
 (0)