This code use for calendars access
if ([eventStore respondsToSelector:@selector(requestAccessToEntityType:completion:)])
{
[eventStore requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error)
{
if (granted)
{
//the Calendars permission is given
//do your code for Calendars
}
else{
//the Calendars permission is not given
}
}];
}
No comments:
Post a Comment