Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event text cutoff in timeline view for short events #347

Closed
3 tasks done
DevonAllary opened this issue Sep 3, 2022 · 2 comments
Closed
3 tasks done

Event text cutoff in timeline view for short events #347

DevonAllary opened this issue Sep 3, 2022 · 2 comments
Labels

Comments

@DevonAllary
Copy link

New Issue Checklist

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.

Screen Shot 2022-09-03 at 10 27 51 AM

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.

@DevonAllary DevonAllary added the bug label Sep 3, 2022
@richardtop
Copy link
Owner

This is in fact should work. I'll check and get back to you. Let's keep this open as a bug.

@richardtop
Copy link
Owner

richardtop commented Sep 20, 2022

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

Simulator Screen Shot - iPhone 14 Pro Max - 2022-09-20 at 22 31 50

After

Simulator Screen Shot - iPhone 14 Pro Max - 2022-09-20 at 22 33 13

Feel free to close this issue if it solves your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants