Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8849611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:41:47+00:00 2026-06-14T12:41:47+00:00

I’m using a EKEventEditViewController which I’m able to populate with the info I need.

  • 0

I’m using a EKEventEditViewController which I’m able to populate with the info I need. I’m granted access to the Calendars and everything. My problem is when I click “Cancel” nothing happens. And when I click “Done” I get an error saying that No calendar has been set, no date has been set and “The event does not belong to that event store”.

I don’t think that my didCompleteWithAction delegate method is being called.

My viewController conforms to:

@interface EventoViewController : UIViewController <EKEventEditViewDelegate>

When I try to set self as delegate I get the error:

sending EventoViewController *const__strong' to parameter of incompatible type 'id<UINavigationControllerDelegate>'

Original Code .h

#import <UIKit/UIKit.h>
#import <EventKit/EventKit.h>
#import <EventKitUI/EventKitUI.h>

@interface EventoViewController : UIViewController <EKEventEditViewDelegate>

@property (weak, nonatomic) IBOutlet UILabel *eventDetailTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *eventDetailDateLabel;
@property (weak, nonatomic) IBOutlet UILabel *eventDetailDescriptionLabel;


- (IBAction)closeModalView:(id)sender;
- (IBAction)addEventToNative:(id)sender;


@end

Original .m

#import "EventoViewController.h"



@implementation EventoViewController

@synthesize eventDetailTitleLabel, eventDetailDateLabel, eventDetailDescriptionLabel;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad { [super viewDidLoad]; }

- (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; }

- (IBAction)closeModalView:(id)sender { [self dismissModalViewControllerAnimated:YES]; }

- (IBAction)addEventToNative:(id)sender {
NSLog(@"Clicked ");
EKEventStore *eventStore = [[EKEventStore alloc] init];

if([eventStore respondsToSelector:@selector(requestAccessToEntityType:completion:)]) {
    // iOS 6 and later
    [eventStore requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) {

        // perform the main thread here to avoid any delay. normally seems to be 10 to 15 sec delay.
        [self performSelectorOnMainThread: @selector(presentEventEditViewControllerWithEventStore:) withObject:eventStore waitUntilDone:NO];



        if (granted){
            NSLog(@"We are granted to access Calendars!");
            //---- codes here when user allow your app to access theirs' calendar.

        }
        else {
            //---- code for no permission
            NSLog(@"We have no permission to access calendars!");
        }
    }];
}
}

- (void)presentEventEditViewControllerWithEventStore:(EKEventStore*)eventStore {
EKEventEditViewController* eventEditVC = [[EKEventEditViewController alloc] init];
eventEditVC.eventStore = eventStore;

EKEvent* event = [EKEvent eventWithEventStore:eventStore];
event.title = self.eventDetailTitleLabel.text;
event.startDate = [NSDate date];
event.endDate = [NSDate date];
event.URL = [NSURL URLWithString:@"http://portalsatuat.plataforma.sat.gob.mx/m/sp/paginas/home.aspx"];
event.notes = @"Evento SAT";
event.allDay = YES;
eventEditVC.event = event;

//eventEditVC.delegate = (id)self;
[self presentViewController:eventEditVC animated:YES completion:nil];
}


- (void)eventEditViewController:(EKEventEditViewController *)controller didCompleteWithAction:(EKEventEditViewAction)action {
    NSLog(@"Clicked Cancel or Done");
    [self dismissModalViewControllerAnimated:YES];
}

- (void)eventViewController:(EKEventViewController *)controller didCompleteWithAction:(EKEventViewAction)action {
    NSLog(@"No se que esta pasando aqui!");
}

- (void)viewDidUnload {
    [self setEventDetailTitleLabel:nil];
    [self setEventDetailDateLabel:nil];
    [self setEventDetailDescriptionLabel:nil];
    [super viewDidUnload];
}

@end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:41:48+00:00Added an answer on June 14, 2026 at 12:41 pm

    You need to assign self in your view controller class to the editViewDelegate property on the controller – the EKEventEditViewController class is a subclass of UINavigationController so the inherited delegate property is for handling navigation events. Hope that helps.

    - (void)presentEventEditViewControllerWithEventStore:(EKEventStore*)eventStore {
        EKEventEditViewController* eventEditVC = [[EKEventEditViewController alloc] init];
        eventEditVC.eventStore = eventStore;
        // Add this line:
        eventEditVC.editViewDelegate = self;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have thousands of HTML files to process using Groovy/Java and I need to
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
In my XML file chapters tag has more chapter tag.i need to display chapters
I would like to run a str_replace or preg_replace which looks for certain words

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.