0

After added below code its display list of UILabel below FSCalendar dates. But the label overlap dates inside calendar.

How to align weekly / Monthly FSCalendar Label below dates?

 func calendar(_ calendar: FSCalendar, willDisplay cell: FSCalendarCell, for date: Date, at monthPosition: FSCalendarMonthPosition) {
            let labelMy2 = UILabel(frame: CGRect(x: 10, y:  calendar.rowHeight, width: cell.bounds.width - 20, height: 20))
            labelMy2.font = UIFont.init(font: Font.interRegular, size: 10)
            labelMy2.text = " 00.00 "
        labelMy2.textAlignment = .center
            labelMy2.backgroundColor = UIColor.init(named: ColorPalette.gray100Color)
            labelMy2.textColor = UIColor.init(named: ColorPalette.gray600kColor)
            cell.addSubview(labelMy2)
    }

Below Added Image enter image description here

kiran
  • 4,285
  • 7
  • 53
  • 98
  • you can use directly datasource methods for title or subtitle text below dates `calendar(_ calendar: FSCalendar, titleFor date: Date)` and `calendar(_ calendar: FSCalendar, subtitleFor date: Date)` – Kishan Bhatiya Dec 16 '22 at 08:16

0 Answers0