1

私はこれを検索しましたが、唯一の解決策は UIAlertViewDelegate から派生しているようです。太字のテキストを削除するためだけにそれをしたくありません。

アラート ビューをポップするために使用するコードは次のとおりです。

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];

ここに画像の説明を入力

4

3 に答える 3

3

これは iOS のバグであり、タイトルが設定されていないすべてのアラートに影響します。

興味深いことに、ほとんどの標準 iOS アラート (App Store など) は影響を受けません。

于 2014-10-07T17:10:25.137 に答える
2

これは iOS 8 で機能します。@"" 内にスペースを入れずに、タイトルに空の文字列を入れるだけです。

  [[[UIAlertView alloc] initWithTitle:@""
     message:@"My message" 
     delegate:nil
     cancelButtonTitle:@"OK"
     otherButtonTitles:nil] show];
于 2015-08-18T08:15:30.407 に答える