BBCodeString 0.2.2

BBCodeString 0.2.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jan 2016

Maintained by Miha Rataj.



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, [email protected]

License

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