0

I have implemented the native event calendar in my application. I am able to display the calendar shown in the screenshot below by using the following code:

EKEventEditViewController *eventEditViewController = [[EKEventEditViewController alloc] init];
eventEditViewController.editViewDelegate = self;
eventEditViewController.event = event;
[self presentViewController:eventEditViewController animated:YES completion:nil];`

However, I am not able to change the color of the Cancel and Done buttons. How can I change the color of these buttons for the calendar?

enter image description here

Community
  • 1
  • 1
VasuIppili
  • 37
  • 6

3 Answers3

1

In my case, the problem was the navigationBar.barStyle. I set mine to be UIBarStyleBlackOpaque and it made the white buttons show up nicely.

nc = [[UINavigationController alloc]initWithRootViewController:eventController];
nc.modalPresentationStyle = UIModalPresentationPopover;
nc.navigationBar.barStyle =  UIBarStyleBlackOpaque;
0

try set your navigation controller tint color

self.navigationController.navigationBar.tintColor = [UIColor redColor];

or customize bar button item with desired color?

air_bob
  • 1,317
  • 14
  • 26
  • This is not going to work, the view controller was presented on a navigation but it was never pushed so it doesn't know it parent, in another words navigationController it always nil. – Marcio Klepacz Apr 21 '15 at 16:34
0

You can set a tint color for all your navigation controllers for example: on AppDelegate didFinishLaunchingWithOptions

[[UINavigationBar appearance] setTintColor:[UIColor redColor]];

Marcio Klepacz
  • 617
  • 6
  • 19