2014-10-07 24 views
1

加粗我搜索了這一點,唯一的解決方案似乎是從UIAlertViewDelegate派生。我不想這樣做只是爲了消除粗體文本。爲什麼我所有的UIAlertView標籤/文本默認在iOS 8

,我使用彈出警告我查看代碼如下:

NSString* errPrompt = @"some text here, anything that will not show bold :)"; 
UIAlertView* alert = [[UIAlertView alloc] initWithTitle:title 
               message:errPrompt 
               delegate:nil 
             cancelButtonTitle:[self getUiText:"OK"] 
             otherButtonTitles:nil]; 
[alert show]; 

enter image description here

回答

3

這是iOS中的錯誤,影響不具有標題集合中的所有警報。

有趣的是,大多數標準iOS警報(如在App Store中)不受影響。

+0

感謝流體快速反應!我現在只是將標題設置爲@「」。 – neuman8 2014-10-07 18:25:03

1

這適用於我在iOS 8上。只需在標題中空白字符串,在@「」裏面沒有空格。

[[[UIAlertView alloc] initWithTitle:@"" 
    message:@"My message" 
    delegate:nil 
    cancelButtonTitle:@"OK" 
    otherButtonTitles:nil] show]; 
相關問題