Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 416
Prerna chavan Avatar asked Oct 07 '11 09:10

Prerna chavan


People also ask

What is bullet list and number list?

In bulleted lists, each paragraph begins with a bullet character. In numbered lists, each paragraph begins with an expression that includes a number or letter and a separator such as a period or parenthesis. The numbers in a numbered list are updated automatically when you add or remove paragraphs in the list.

How do you create a bullet and number list?

To start a numbered list, type 1, a period (.), a space, and some text. Word will automatically start a numbered list for you. Type* and a space before your text, and Word will make a bulleted list.

What is known as a bullet list?

Lists made with bullets are called bulleted lists. The HTML element name for a bulleted list is "unordered list", because the list items are not arranged in numerical order (as they would be in a numbered list). Usually, bullet points are used to list things.

What is the function of bullet list?

A bullet list is used when creating a list of two or more items, and their order is not important. For example, a list of items you want to buy from a store could be shown in a bullet list. A number list should be used if you're creating a list of steps or directions where the order is important.


1 Answers

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;
like image 110
Totumus Maximus Avatar answered Oct 27 '22 04:10

Totumus Maximus