1

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...

Alice Wei
  • 21
  • 2

1 Answers1

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