Skip to content

Commit

Permalink
add tag ID
Browse files Browse the repository at this point in the history
  • Loading branch information
Datt1994 authored Dec 10, 2018
1 parent a065a05 commit febcd1e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@ Copy & paste DPVideoMerger.swift file into your project
**Set up**
```swift
self.txtMain.dpTagDelegate = self // set DPTagTextViewDelegate Delegate
self.txtMain.setTxt("hello @[---Datt---]")
self.txtMain.tagPrefix = "@[---" // or use Interface Builder
self.txtMain.tagPostfix = "---]" // or use Interface Builder
self.txtMain.setTagDetection(true) // true :- detecte tag on tap , false :- Search Tags using @,#,etc.
self.txtMain.arrSearchWith = ["@","#","$$"] // Search start with this strings.
let arrTags = self.txtMain.getAllTag("hello @[---Datt---]") // get all tags from string.
self.txtMain.txtFont = UIFont(name: "HelveticaNeue", size: CGFloat(15))! // set textview text font family
self.txtMain.tagFont = UIFont(name: "HelveticaNeue-Bold", size: CGFloat(17.0))! // set textview tag font family

var arrTags = [DPTag]()
for i in 0 ..< arrTagedUser.count { // arrTagedUser = ["Datt"]
arrTags.append(DPTag(strTagName: arrTagedUser[i], tagID: i))
}
self.txtMain.setTxtAndTag(str: "hello @[---Datt---]", tags: arrTags)
self.txtMain.setTxt("hello @[---Datt---]")
```

**Delegate Methods**
Expand Down

0 comments on commit febcd1e

Please sign in to comment.