Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 1.41 KB

File metadata and controls

41 lines (26 loc) · 1.41 KB

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.