0

I used this Calendar enter image description here

I want a date when I chose to be closed. I've added it to View

let date = NSDate()
        calendarView.selectedDates = [date]
        calendarView.selectionRangeLength = 1
        calendarView.maxMonths = 1
        calendarView.delegate = self
        calendarView.createCalendar()
        calendarView.center = self.view.center

Does anyone have an idea?

Shadow
  • 55
  • 11

1 Answers1

0

Are you presenting calendarView as a modal view controller? If so you could use self.dismissViewControllerAnimated().

If the calendar is presented via a navigation controller you could use navigationController.popViewControllerAnimated() or use an unwind segue once a date is selected or a button is pressed: What are Unwind segues for and how do you use them?

Community
  • 1
  • 1
Flip
  • 27
  • 1
  • 6