1

ローカル通知を使用していますが、アラートのメッセージ本文に画像を入れたいです。どうやってやるの?

4

3 に答える 3

8

私も同じ質問を検索しました。そして、 をカスタマイズできないことがわかったので、 custom を表示することUILocalNotificationでこれを処理しました。application:didReceiveLocalNotification:UIAlertView

于 2011-02-09T06:50:09.667 に答える
0

これはうまくいくはずです。やってみて:

UIAlertView *successAlert = [[UIAlertView alloc] initWithTitle:title 
message:message
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil]; UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(220, 10, 40, 40)]; UIImage *smiley= [UIImage imageNamed:@"smiley.png"]; [imageView setImage:smiley]; [smiley release]; [successAlert addSubview:imageView]; [imageView release]; [successAlert show]; [successAlert release];

幸運を、

Aurum Aquila

于 2011-02-09T06:40:02.220 に答える
-1

疑問符や通知などの単純な画像を使用している場合は、アイコン タイプのアラートを持つExt JSをお勧めします。

画像を追加することもできます。

于 2011-02-09T06:43:22.157 に答える