Skip to content

A custom textview for showing hashtag, mention url or attachments. When you start with # and give space after writing a word it turns out to be hashtag, similar for the mention when use with @. URL can be used too.

License

Notifications You must be signed in to change notification settings

manisingh41/TextviewMentionHashtag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TextviewMentionHashtag

A custom textview for showing hashtag, mention url or attachments. When you start with # and give space after writing a word it turns out to be hashtag, similar for the mention when use with @. URL can be used too.

To use this framework using cocoapods:

pod 'CustomMention', :git => 'https://github.com/manisingh41/TextviewMentionHashtag'

Import the framework in the viewcontroller:

import CustomMention

Create an outlet of your view and subclass it:

@IBOutlet weak var YOUR_UIVIEW_NAME: NewcustomMentionTextview!

In the viewDidLoad(), paste these lines:

YOUR_UIVIEW_NAME.createCustomTextview(wid: YOUR_UIVIEW.frame.size.width) //to create a custom textview with customized size.

YOUR_UIVIEW_NAME.textviewEditMode?.checkPlaceholder() // to check the placeholder.

YOUR_UIVIEW_NAME.adjustFramesTextView() // to adjust the frame if there is already text given in the beginning.

YOUR_UIVIEW_NAME.textviewEditMode?.becomeFirstResponder() // to make the textview first responder

//For further assistance contact: nagmanisingh41@gmail.com

About

A custom textview for showing hashtag, mention url or attachments. When you start with # and give space after writing a word it turns out to be hashtag, similar for the mention when use with @. URL can be used too.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published