Search code examples
objective-ccocoa-touchipaduitextview

Bullet list and Numbered list in UITextView


Can any body tell me how to add bullet list and numbered list to the selected text in UITextView.


Solution

  • Check this question: iphone bullet point list

    You might want to add the unicode char of bulletpoints to your lines (@"\u2022)

    NSArray * items = ...;
    NSMutableString * bulletList = [NSMutableString stringWithCapacity:items.count*30];
    for (NSString * s in items)
    {
       [bulletList appendFormat:@"\u2022 %@\n", s];
    }
    textView.text = bulletList;