I'm making a calendar view using UITableView
(see image below), each UITableViewCell
represent a month with several subviews and each subview means one day let's call it a DayView
, every DayView
contains a subview UILabel to show the day of the month. Until now, everything seems good, and the scrolling of UITableView
is smoothly. But after I add this line in the DayView
's - (instancetype)initWithFrame:(CGRect)frame
:
self.layer.cornerRadius = 5.0;
The UITableView's frame rate become much lower when scrolling. It can't catch up my finger at all. So what is the most likely cause?
By the way, what should I do to resolve this kind of problem?
Thanks.
Edit:
The cellForRowAtIndexPath
method:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *monthCellIdentifier = @"MonthCell";
OPCalendarPageView *cell = [tableView dequeueReusableCellWithIdentifier:monthCellIdentifier];
cell.manager = _manager;
cell.date = [self dateForIndexPath:indexPath];
return cell;
}
And I'm using the library JTCalendar, OPCalendarPageView
is a custom version of JTCalendarPageView
, just added a month label above the first day of month.