CalendarKit
CalendarKit copied to clipboard
Event text cutoff in timeline view for short events
New Issue Checklist
- [x] Use the latest version of CalendarKit
- [x] I've read the Contribution Guidelines
- [x] I've searched for existing GitHub issues
Issue Description
Is there any way to increase the size of the hour blocks in the calendar day view or to adjust the position of the text inside the event? With short events (around 15 minutes) the event text gets cut off, even with small sized font.
Code I'm using with CalendarKit
I tried using the fix recommended in #236 but it's not working.
override func viewDidLoad() {
super.viewDidLoad()
title = "Calendar"
self.dayView.autoScrollToFirstEvent = true
var style = CalendarStyle()
style.timeline.verticalInset = 90
updateStyle(style)
}
Result I am trying to achieve
I'd like to either increase the size of the hour blocks or adjust the positioning of the text box inside the event so that the text doesn't get cutoff.
This is in fact should work. I'll check and get back to you. Let's keep this open as a bug.
Please, use vertifalDiff
property instead:
override func viewDidLoad() {
super.viewDidLoad()
title = "CalendarKit Demo"
navigationController?.navigationBar.isTranslucent = false
dayView.autoScrollToFirstEvent = true
reloadData()
var style = CalendarStyle()
style.timeline.verticalDiff = 90
updateStyle(style)
}
This code works perfectly:
Before
After
Feel free to close this issue if it solves your problem.