1

I am working on one of my iOS application where I am needed to add the events on the date, I am trying to achieve the UI result like in bellow screenshot.

I've worked out most of area using FSCalendar, JTAppleCalendar etc but I meet most of requirements which I am looking for except the adding event label/string on date.

Added current status screenshot using FSCalendar Library. I can see only dots(ImageView) FSCalendar is not allowing me to add the label/string on date.

Here is What I'm aiming to do.

enter image description here

Can anyone help me how can achieve this?

Thank you in advance.

Mukesh Lokare
  • 2,159
  • 26
  • 38

2 Answers2

1

// check FSCalendarDataSource // Tells the delegate that the specified cell is about to be displayed in the calendar.

func calendar(_ calendar: FSCalendar, willDisplay cell: FSCalendarCell, for date: Date, at monthPosition: FSCalendarMonthPosition) {

        let labelMy2 = UILabel(frame: CGRect(x: 10, y: 20, width: cell.bounds.width, height: 20))
        labelMy2.font = UIFont(name: "Henderson BCG Sans", size: 10)
        labelMy2.text = "abc"
        labelMy2.layer.cornerRadius = cell.bounds.width/2
        labelMy2.textColor = UIColor.init(hex: "#32C77F")
        cell.addSubview(labelMy2)

}
Chaitanya
  • 52
  • 4
0

You can customize both of the libraries.I have done that before.There must be a .xib file for a UiCollectionView that is being used for the calendar.You can customize that Xib file and add label for the events. Just unlock the pod files and work on them.