weekdayHeaderEnabled not working
ykphuah opened this issue · comments
Phuah Yee Keat commented
Saw #86 , but still doesn't work for me, adding the edgesForExtendedLayout = [] make the appbar gray, that's all.
controller.firstDate = Date().subtract(years: 1)
controller.lastDate = Date().add(years: 3)
controller.selectedDate = self.value
controller.scroll(to: self.value ?? Date(), animated: true)
controller.weekdayHeaderEnabled = true
controller.weekdayTextType = .short
controller.edgesForExtendedLayout = []
controller.delegate = self.delegate
cell.formViewController()?.navigationController?.pushViewController(controller, animated: true)
Phuah Yee Keat commented
I managed to get the header to show, but the appbar is still gray, by rearranging the weekdayHeaderEnabled setting to before the selectedDate setter.
controller.firstDate = Date().subtract(years: 1)
controller.lastDate = Date().add(years: 3)
controller.weekdayHeaderEnabled = true
controller.weekdayTextType = .short
controller.edgesForExtendedLayout = []
controller.selectedDate = self.value
controller.scroll(to: self.value ?? Date(), animated: true)
controller.delegate = self.delegate
cell.formViewController()?.navigationController?.pushViewController(controller, animated: true)
Phuah Yee Keat commented
Finally managed to solve the gray appbar issue with the following in the viewDidLoad
self.navigationController?.navigationBar.isTranslucent = false