I am studying on swift, and I have a project using CalendarKit. I want to put date into navigation title so that can change current date while swiping. But I have no idea on it...
Asked
Active
Viewed 132 times
1 Answers
1
Its very simeple: Step I- Write below code in viewDidLoad() fucntion to set navigationTitle.
self.navigationItem.title = "\(Date())"
Step II- You can change navigationTitle on swiping by using same code in your swiping action.
Eg:
func onSwipeChangeTitle() {
self.navigationItem.title = "\(Date())".
}

Kudos
- 1,224
- 9
- 21