1

変数の値が fx 40 を超えると、ローカル通知をトリガーする必要があるアプリを開発しています。

私は使用することを考えていました:

If(Myvalue > 40) {
    Notification triggers
}

しかし、通知をトリガーする方法がわかりません。

手伝っていただけませんか?

4

1 に答える 1

0

次のようなもので、 の使用を開始できますUILocalNotification

UILocalNotification *localNotif = [[UILocalNotification alloc] init];

localNotif.fireDate = [NSDate date];

localNotif.alertBody = @"Message body"
localNotif.alertAction = @"View Details";

localNotif.soundName = UILocalNotificationDefaultSoundName;
localNotif.applicationIconBadgeNumber = 1;

[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
于 2013-11-04T12:29:45.047 に答える