我展示了我的日历选择器,如下所示:
let calendarChooser = EKCalendarChooser(selectionStyle: .single,
displayStyle: .writableCalendarsOnly,
entityType: .event,
eventStore: eventStore)
calendarChooser.showsDoneButton = true
calendarChooser.showsCancelButton = true
let navigationController = UINavigationController(rootViewController: calendarChooser)
navigationController.view.tintColor = .orange // change color of navigation controller buttons
self.present(navigationController, animated: true, completion: nil)
我更改了导航控制器按钮Cancel
(左上)、Done
(右上)和Add Calendar
(左下)的颜色。事实上我不需要这个Add calendar
功能。我试过导航控制器和日历选择器hidesBottomBarWhenPushed = false
。tabBarItem = nil
没有喜悦。
问题1:是否可以删除Add calendar
按钮?
如果我无法删除Add Calendar
按钮,我至少希望将其Cancel
按钮(左上角)的颜色也更改为橙色(它显示默认蓝色)。
问题 2:如何更改控制器Cancel
上显示的按钮颜色Add calendar
?