mirror of
https://github.com/status-im/react-native-camera-kit.git
synced 2025-02-28 07:30:40 +00:00
make cell size relative to collection bounds
This commit is contained in:
parent
08cf37e55f
commit
b2e4e5cbc9
@ -60,7 +60,7 @@ static NSString * const CellReuseIdentifier = @"Cell";
|
||||
|
||||
-(CGSize)cellSize {
|
||||
if (CGSizeEqualToSize(_cellSize, CGSizeZero)) {
|
||||
CGFloat minSize = (MIN(SCREEN_WIDTH, SCREEN_HEIGHT) * 1.00)/3;
|
||||
CGFloat minSize = (MAX(self.bounds.size.width - (2*self.minimumInteritemSpacing.floatValue),0))/3;
|
||||
_cellSize = CGSizeMake(minSize, minSize);
|
||||
}
|
||||
return _cellSize;
|
||||
@ -107,12 +107,12 @@ static NSString * const CellReuseIdentifier = @"Cell";
|
||||
return self.minimumLineSpacing ? self.minimumLineSpacing.floatValue : DEFAULT_MINIMUM_INTERITEM_SPACING;
|
||||
}
|
||||
|
||||
// Layout: Set Edges
|
||||
- (UIEdgeInsets)collectionView:
|
||||
(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section {
|
||||
// return UIEdgeInsetsMake(0,8,0,8); // top, left, bottom, right
|
||||
return UIEdgeInsetsMake(0,0,0,0); // top, left, bottom, right
|
||||
}
|
||||
//// Layout: Set Edges
|
||||
//- (UIEdgeInsets)collectionView:
|
||||
//(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section {
|
||||
// // return UIEdgeInsetsMake(0,8,0,8); // top, left, bottom, right
|
||||
// return UIEdgeInsetsMake(0,0,0,0); // top, left, bottom, right
|
||||
//}
|
||||
|
||||
|
||||
-(void)setAlbumName:(NSString *)albumName {
|
||||
|
Loading…
x
Reference in New Issue
Block a user