Swiftpack.co - damodarnamala/XCalender as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by damodarnamala.
damodarnamala/XCalender v0.0.2
Calendar view package to use in ios apps. Please feel free to Raise code change to make my library to stable.
⭐️ 0
🕓 3 years ago
iOS macOS
.package(url: "https://github.com/damodarnamala/XCalender.git", from: "v0.0.2")

XCalender

XCalendar is a swift package for calender view to an iOS application. XCalendar supports from iOS 13 version. This library has the functionality to navigate between months and selection of dates from the calendar.

Usage


import UIKit
import XCalender

class ViewController: UIViewController {
    @IBOutlet weak var calenderView: XCalenderView?
    @IBOutlet weak var selectedMonth: UILabel?
    
    var month = 0
    override func viewDidLoad() {
        super.viewDidLoad()
        calenderView?.dalegate = self
        self.calenderView?.getMonth(by: month)

        // Do any additional setup after loading the view.
    }
    
    @IBAction func nextPrevAction(sender: UIButton) {
        if sender.tag == 0 { 
        //for prevous month dates
            month -= 1
        } else { 
        //for next month dates
            month += 1
        }
        self.calenderView?.getMonth(by: month)
    }
}


extension ViewController: XCalenderDelegate {
    func didSelected(date: Date) {
        self.selectedMonth?.text = date.string(with: "dd MMM yyyy")
    }
}

Preview

XCalender Preview

-I'm welcoming the community to make changes to this library. Anyone can raise pullrequest so that we can extend the functionality together.

Follow me on social account!

GitHub

link
Stars: 0
Last commit: 3 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics