gpt4 book ai didi

ios - iPad Air iOS 7.1 和 iOS 8.0 中的 FFCalender + Xcode 6.0.1 + UICollectionView,月 View 分散

转载 作者:行者123 更新时间:2023-11-29 12:36:47 28 4
gpt4 key购买 nike

我正在使用 FFCalender .在那个 MonthView 中分散了

在模拟器 iPad 2 8.0iPad 2 7.0iPad Retina 7.0iPad Retina 8.0 中没问题

enter image description here

在模拟器 iPad Air 8.0 iPad Air 7.1 中不正常

enter image description here

编辑:iPad Air 7.1 也有同样的问题

最佳答案

因此计算 正确单元格大小

在 FFMonthCollectionView.m 中

- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section 
{
.....................

//comment sizeOfCells
//CGSize sizeOfCells = CGSizeMake((self.frame.size.width-6*SPACE_COLLECTIONVIEW_CELL)/7,(self.frame.size.height-([dateFirstDayOfMonth numberOfWeekInMonthCount]-1)*SPACE_COLLECTIONVIEW_CELL-SPACE_COLLECTIONVIEW_CELL)/[dateFirstDayOfMonth numberOfWeekInMonthCount]);

//Add these line
CGSize sizeOfCells = CGSizeMake((self.frame.size.width-7*SPACE_COLLECTIONVIEW_CELL)/7, (self.frame.size.height-([dateFirstDayOfMonth numberOfWeekInMonthCount]-1)*SPACE_COLLECTIONVIEW_CELL-SPACE_COLLECTIONVIEW_CELL)/[dateFirstDayOfMonth numberOfWeekInMonthCount]);

......................

}

引用Month Calendar: Uicollectionview Cells have the right size calculated

关于ios - iPad Air iOS 7.1 和 iOS 8.0 中的 FFCalender + Xcode 6.0.1 + UICollectionView,月 View 分散,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26098898/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com