Calendar layout wrong when view disappears mid transition

2 posts, 0 answers
  1. Garett
    Garett avatar
    1 posts
    Member since:
    Jan 2016

    Posted 07 Jan Link to this post

    Hello,

     New to the forum and TKCalendar, so I apologize ahead of time if this is in the wrong place, a repeat post, or just dumb.

    I'm having an issue when the calendar is transitioning between months (left/right) and the view disappears (either by the app going to background or going to another view controller).  The problem is that when I return to the calendar the calendar's scrollview offset seems to be stuck at where it left off.  So instead of the usual Sun-Sat weeks the calendar is showing (e.g. T-M, or half of Friday- half of Th).  I tried to redisplay/layout the calendar and individual cells, but nothing seems to redraw the calendar correctly.  

     

    The only fix I've found for this so far is to allocate a new TKCalendar every time the view controller appears and replace the TKCalendar, which seems to be unwanted overhead if it's possible to avoid.

     

    Thanks,

  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 11 Jan Link to this post

    Hi Garett,

    Thank you for contacting us.

    We have not observed this issue. Please, could you send us a sample project where it can be observed and the exact steps to reproduce it. This will help us to investigate the issue in detail and address it. One thing you could try is to call the update method for the current calendar presenter:
    [calendarView.presenter update:YES];

    If this doesn't help you can try the reloadData method of TKCalendar:
    [calendarView reloadData];

    I hope this helps.

    Regards,
    Jack
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top