iphone - Create calendar event from inside my application -
i know there lots of questions , useful answers concerning question on web. tried add calendar event iphone calendar inside application. used code, worked:
ekeventstore *es = [[ekeventstore alloc] init]; ekeventeditviewcontroller *controller = [[ekeventeditviewcontroller alloc] init]; controller.eventstore = es; controller.editviewdelegate = self; [self presentmodalviewcontroller:controller animated:yes]; the thing not release calendar controller, because should have said:
[controller release] or main.m set autorelease:
int main(int argc, char *argv[]) { @autoreleasepool { return uiapplicationmain(argc, argv, nil, nsstringfromclass([...appdelegate class])); } } and if manually release error, have change in main.m?
in target's build settings, if see objective-c automatic reference counting using arc:

and if using arc not responsible release object self.
i recommend read more arc, can start here, important thing should consider if want build real application.
Comments
Post a Comment