是否有办法添加、阅读或删除新第5条“现场排雷人员”的提醒材料?
For a basic app with nonconsumable in-app purchases, has anyone figured out best practices for using SKPaymentQueue s restoreCompletedTransactions? Observations I know it s recommended to always ...
是否有办法添加、阅读或删除新第5条“现场排雷人员”的提醒材料?
所有这一切都有可能做到:
https://developer.apple.com/technologies/ios6/
At the time of writing this answer was sufficient. To keep it updated here is a tutorial which looks very useful for anyone developing an app which interacts with the native reminders app: Using iOS 6 Event Kit to Create Date and Location Based Reminders
The reminders are not on a public API. The "geofences" that are created are visible to some processes (I ve seen the fence count in console logs) but in no way accessible to another app. You are only able to register fences to your own app.
I do not believe this is possible. There is no public API that is available for developers.
I d really like access to the reminders too, I found a post explaninf adding events to the calendar here ..
While the Calendar is "ok" for reminders, it makes more sence to use the IOS 5 "Reminders" app, after all SIRI can use it! :p
EDIT:我通过使用当地通知......解决了我的问题。
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
if (localNotif == nil)
return nil;
localNotif.fireDate = itemDate;
localNotif.timeZone = [NSTimeZone defaultTimeZone];
// Notification details
localNotif.alertBody = @"Here is your alert!";
// Set the action button title
localNotif.alertAction = @"View";
//localNotif.soundName = UILocalNotificationDefaultSoundName;
localNotif.soundName = @"Bell.aiff";
localNotif.applicationIconBadgeNumber = 1;
// Specify custom data for the notification
NSDictionary *infoDict = [NSDictionary dictionaryWithObject:myCustomMessage.text forKey:@"message"];
localNotif.userInfo = infoDict;
// Schedule the notification
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
这使我能够提出似乎像普什通知这样的通知,并且即使在重新启用这些通知时,也保留这些通知。
如果需要的话,你可以清除。
[[UIApplication sharedApplication] cancelAllLocalNotifications];
原告
I can help you out with the trigger on arriving on predefined location. here is the code.
1: import CoreLocation.framework
2. 主计长。
#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
@interface ViewController : UIViewController<CLLocationManagerDelegate>
@end
3. 概览
#import "ViewController.h"
@interface ViewController (){
CLLocationManager *locationManager;
CLRegion *mexicoBoundary;
}
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
locationManager = [[CLLocationManager alloc] init];
[locationManager setDelegate:self];
[locationManager setDistanceFilter:kCLDistanceFilterNone];
CLLocationCoordinate2D regionCords ;
//19.432608,-99.133208 lat, lon for mexico city
regionCords=CLLocationCoordinate2DMake(19.432608,-99.133208);
//5000 below, is in meters-radius
mexicoBoundary =
[[CLRegion alloc]initCircularRegionWithCenter:regionCords
radius:5000.0
identifier:@"mexico_Day"];
[locationManager startMonitoringForRegion:mexicoBoundary];
}
-(void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region
{
NSLog(@"%@: %@", @"region entered", region.identifier);
}
-(void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region
{
NSLog(@"%@: %@", @"region exited", region.identifier);
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
For a basic app with nonconsumable in-app purchases, has anyone figured out best practices for using SKPaymentQueue s restoreCompletedTransactions? Observations I know it s recommended to always ...
I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...
I have a UITextField that is a subview of a UITableViewCell. When my view loads, I want the text field to become first responder. I have a pointer to the text field in the table cell, so to do this I ...
I ve been working on adding in-app purchases and was able to create and test in-app purchases using Store Kit (yay!). During testing, I exercised my app in a way which caused the app to crash mid ...
In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...
Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...
I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...
Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...