Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.
/ JTATEmoji Public archive

This category allows you to convert file placeholder into given image like emoji with a single line

License

Notifications You must be signed in to change notification settings

joeytat/JTATEmoji

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JTATEmoji

What is this?

This category allows you to convert file placeholder into given image like emoji.

[kiss] and [hug] will be look like this

Usage

#import "NSAttributedString+JTATEmoji.h"
NSString *normalStr = @"This category allows you to convert string into given image like this [kiss] and this [hug]";
myTextView.attributedText = [NSAttributedString emojiAttributedString:normalStr withFont:_myTextView.font];
    

Calculate string size after converted

[myTextView sizeThatFits:CGSizeMake(width, CGFLOAT_MAX)].height

Add more images

Emoji.plist is a dictionary. Key is the description of emoji placeholder. Value is image file name. You can replace whatever you want.
If your file placeholder doesn't refer to \\[[A-Za-z0-9]*\\], you should modify regular expression in NSAttributedString+JTATEmoji.m

License

JTATEmoji is published under MIT License

About

This category allows you to convert file placeholder into given image like emoji with a single line

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published