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

About

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

Resources

Stars

18 stars

Watchers

1 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

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

Stars

18 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages