diff --git a/CoachPlus/app/events/EventDetailViewController.swift b/CoachPlus/app/events/EventDetailViewController.swift index d929560..d50b0d5 100644 --- a/CoachPlus/app/events/EventDetailViewController.swift +++ b/CoachPlus/app/events/EventDetailViewController.swift @@ -15,7 +15,6 @@ class EventDetailViewController: CoachPlusViewController, UITableViewDelegate, U case news = 0 case participation = 1 } - var event:Event? var news = [News]() @@ -46,8 +45,7 @@ class EventDetailViewController: CoachPlusViewController, UITableViewDelegate, U override func viewDidLoad() { super.viewDidLoad() - - + self.view.heroID = self.heroId self.nameLbl.heroID = "\(self.heroId)/name" @@ -61,9 +59,11 @@ class EventDetailViewController: CoachPlusViewController, UITableViewDelegate, U if (self.membership?.isCoach())! { self.editBtn.setIcon(icon: .googleMaterialDesign(.modeEdit), iconSize: 20, color: .coachPlusLightGrey, backgroundColor: .clear, forState: .normal) self.sendReminderBtn.setIcon(icon: .googleMaterialDesign(.alarm), iconSize: 20, color: .coachPlusLightGrey, backgroundColor: .clear, forState: .normal) + } else { + self.editBtn.isHidden = true + self.sendReminderBtn.isHidden = true } - self.tableView.rowHeight = UITableViewAutomaticDimension self.tableView.estimatedRowHeight = 70 @@ -73,7 +73,6 @@ class EventDetailViewController: CoachPlusViewController, UITableViewDelegate, U } override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) self.nameLbl.text = self.event?.name @@ -88,11 +87,7 @@ class EventDetailViewController: CoachPlusViewController, UITableViewDelegate, U } self.descriptionLbl.text = description - self.locationLbl.text = self.event?.getLocationString() - - - } func loadParticipations() {