У меня есть странный грохот, что я не знаю, как отлаживать ... Вот код:сбоя при использовании EKEventEditViewController
-(void) addEventButtonPressed:(UIButton*)button{
DLog(@"Add new event");
// If event is nil, a new event is created and added to the specified event store. New events are
// added to the default calendar. An exception is raised if set to an event that is not in the
// specified event store.
// When add button is pushed, create an EKEventEditViewController to display the event.
EKEventEditViewController *addController = [[EKEventEditViewController alloc] initWithNibName:nil bundle:nil];
// set the addController's event store to the current event store.
addController.eventStore = self.eventStore;
addController.editViewDelegate = self;
// present EventsAddViewController as a modal view controller
[self presentModalViewController:addController animated:YES];
}
Моего приложение падает после looong времени в эта строка: [self presentModalViewController: addController animated: YES];
Я использую ARC. Любые подсказки? Спасибо!
Моя консоль говорит только EXC_BAD_ACCESS(code=2, address=0xbf7ffff4)
[EDIT] Кажется eventStore
необходимо инициализировать перед передачей его addController
или вы получите аварии. В моем случае это было ноль.
Что вы читаете на консоли? – sergio
просто EXC_BAD_ACCESS, но это займет много времени, чтобы добраться туда .. как из памяти или что-то в этом роде) – Fervus