Hi Steven,
I was wondering how custom monthViewDay views are managed in a memory?
When are they discarded? Are they being reused?
In my app I just create a new view when monthViewDayCustomViewFor is called.
-(UIView*)calView:(IGCalendarView*)calView monthViewDayCustomViewFor:(NSInteger)month day:(NSInteger)day year:(NSInteger)year;
my code never breaks in Dispose of those views, so I wanted to know a little more on how they are managed.
thank you
Mark
Hi Mark,
The view is added as a subView, to our MonthViewDay view. However, that class also is holding a strong reference. Looking back, there isn't actually a need to keep a strong reference. Which may be causing the issue you're seeing.
Once a that MonthDayView is used to represent another day, we release the reference of the custom view, and request another one via the delegate method, and then store the reference to that.
So, I would expect that as you scroll other months into view, the original custom view's should be released.
-SteveZ