TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
Opening Tags: <>
Closing Tags: </>
Multiple commands can be used in a single tag. For example: <b, i, u>. These should be comma seperated. Commands are closed by listing them in a closing tag: </b, i, u>
For commands that take an arguement, an equals sign with no quotes are required. For example: <c=red, font=Georgia>
Commands are parsed linearly, and not nested. Each new command will override previous commands. For exmaple, "<c=red>Hello <c=blue>World</c>!" will result in a red "Hello", blue "World", and a black (uncolored) "!".
Fonts and colors can be described in a nil terminated list using attributedStringFromTaggedStringWithFontsAndColors. They should be of type UIFont and UIcolor. The fonts and colors can be referenced by their position by type in the list using @1, @2, etc. For example, if you pass (in order) myFont1, myColor1, myFont2, myFont3, myColor2, then those can be accessed by font=@1, c=@1, font=@2, font=@3, color=@2 respectively. For example: [@"<font=@1>Hello World</font>" attributedStringFromTaggedStringWithFontsAndColors:myFont];