Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>When you push the event view controller, the <code>Back</code> button will appear with the title "Back" by default, so you do not have to change it manually. However, if you decide to change the <code>Back</code> button, you can do so by assigning a new object of type <code>UIBarButtonItem</code> to the <code>backBarButtonItem</code> property of your navigation item. For example, you can modify the <code>pushController:</code> method to give our root view controller a custom <code>Back</code> button before pushing the event view controller. <br> </p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; self.eventStore = [[EKEventStore alloc]init]; NSTimeInterval nsYear = 1 * 365 * 24.0f *60.0f * 60.0f; NSDate *startDate = [[NSDate date] dateByAddingTimeInterval:-nsYear]; NSDate *endDate = [NSDate date]; NSPredicate *predicate = [self.eventStore predicateForEventsWithStartDate:startDate endDate:endDate calendars:self.eventStore.calendars]; NSArray *events = [self.eventStore eventsMatchingPredicate:predicate]; if ([events count]&gt; 0) { EKEvent *event = [events objectAtIndex:0]; EKEventViewController *controller = [[EKEventViewController alloc]init]; controller.event = event; controller.allowsEditing = YES; controller.allowsCalendarPreview = YES; controller.delegate = self; self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"Go BACK OK" style:UIBarButtonItemStylePlain target:nil action:nil]; [self.navigationController pushViewController:controller animated:YES]; } } </code></pre> <p>Hope, this will help.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload