2011-10-07 19 views
13

編號列表任何機構可以告訴我怎麼符號列表和編號列表添加到UITextView中的選定文本。子彈列表和UITextView的

+0

下面是這個類的https:// codeload。 github.com/eyalc/ECListView/zip/master – Hemang

回答

28

檢查這個問題:iphone bullet point list

您可能要bulletpoints的Unicode字符添加到您的線路(@「\ U2022)

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

如何我可以改變子彈的顏色嗎? –

+0

@MianShahbazAkram它是文本,它應該爲你設置的文本顏色發生改變。取決於你如何使用,當然這些字符串。 –

+0

基本上我只是想改變bullets.So的顏色請描述你我怎麼能? –