我正在使用一个名为MNCalendar的GitHub仓库,我想调用一些单元格。现在,我是这么做的。这两行之间有什么区别?
MNCalendarViewDayCell *cell = [self.collectionView cellForItemAtIndexPath:indexPath];
MNCalendarViewDayCell *cell = (MNCalendarViewDayCell*)[self.collectionView cellForItemAtIndexPath:indexPath];
第一行给了我一个问题,它是一个MNCalendarViewDayCell指针UICollectionViewCell,而另一次是罚款。这里引发了什么,为什么最下面的一个是正确的?
不严重的错误,只是一个问题,只是不知道,并试图从中学到东西:)