Skip to content

BBCodeString is a simple library which enables you to create NSAttributedString object from BB code string.

License

Notifications You must be signed in to change notification settings

mrataj/BBCodeString

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BBCodeString

CI Status Version License Platform

BBCodeString is a simple library which enables you to create NSAttributedString object from bb code string.

Usage

Example of use:

NSString *bbCode = @"[user id=\"42\"]Mary Jones[/user] sent file [file id=\"23\"]Report.pdf[/file].";

BBCodeString *bbCodeString = [[BBCodeString alloc] initWithBBCode:bbCode andLayoutProvider:self];
NSAttributedString *myString = bbCodeString.attributedString;
You can simply set visual attributes for each BB code element by setting layout provider.

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

BBCodeString is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "BBCodeString"

Author

Miha Rataj, rataj.miha@gmail.com

License

BBCodeString is available under the MIT license. See the LICENSE file for more info.

About

BBCodeString is a simple library which enables you to create NSAttributedString object from BB code string.

Resources

License

Stars

Watchers

Forks

Packages

No packages published