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

1 Answer 1

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())".  
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.