1

たくさんの UILocalNotifications がありますが、特定のインデックスパスで特定のものだけを削除したいので、

[[UIApplication sharedApplication] cancelAllLocalNotifications];

私にはうまくいきません。私は私が使用できることを知っています

[[UIApplication sharedApplication] cancelLocalNotification:UILocalNotification];

しかし、指定された NSIndexPath から UILocalNotification を取得するにはどうすればよいですか?

ありがとう。

4

1 に答える 1

2

スケジュールされた通知の配列は、次の場所から取得できます。@property(nonatomic,copy) NSArray *scheduledLocalNotifications

選択したインデックス番号で必要なものを取得し、UILocalNotification*をに渡します- (void)cancelLocalNotification:(UILocalNotification *)notification

于 2011-04-05T02:38:14.040 に答える