0

I am having tableview EKEvents, if a user taps on an event i will push EKEventViewController.

EKEventViewController comes default with delete button in toolbar how can I hide this.

I tried making a custom viewController subclass of EKEventViewController and in viewWillAppear i was hiding the navigationController's toolbar it was working but not properly.Another problem with this it will allows me to navigate to event details which is not required.

let eventViewControler = EKEventViewController()
eventViewController.event = self.events[indexPath.row]
eventViewController.allowsEditing = false
self.navigationController.pushViewController(eventViewControler)

How can I hide the only delete button.

Shayno
  • 788
  • 9
  • 26
AppleBee
  • 1,199
  • 12
  • 26

1 Answers1

0

You can customize rightBarButtonItem.

let rightButton : UIBarButtonItem = UIBarButtonItem(title: "", style: UIBarButtonItemStyle.Plain, target: self, action: "")
self.navigationItem.rightBarButtonItem = rightButton
Rajeev Udayan
  • 310
  • 2
  • 4