Skip to content

RobertDresler/CalendarFoundation

Repository files navigation

CalendarFoundation

Simple date selector for iOS apps based on Swift. Let user select certain day from calendar (or not).


Install

CocoaPods

pod 'CalendarFoundation'

Usage

import CalendarFoundation
    
// Initialize new instance of controller with `dateSelectedBlock`
let calendarVC = CalendarViewController(dateSelectedBlock: { [weak self] date in
    if let date = date {
        // work with received `Date`
    } else {
        // user selected option "Remove date" = `date` is `nil`
    }
})
    
// From you `UIViewController` present it
present(calendarVC, animated: true)

UX

  • Swipe for changing month
  • Tap on day to select Date
  • Tap to Remove date to return nil
  • Tap anywhere to dismiss calendar

Preview

Screen Shot 2019-04-10 at 13 19 40