11
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
// self.avatarImageView.layer.cornerRadius = 25.f;
|
||||
// self.avatarImageView.layer.masksToBounds = YES;
|
||||
self.avatarImageView.layer.cornerRadius = 30.f;
|
||||
self.avatarImageView.layer.masksToBounds = YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -17,6 +17,7 @@ typedef NS_ENUM(NSInteger, DSWebMenuType) {
|
||||
DSWebMenuTelegramType, // Telegram
|
||||
DSWebMenuWhatsAppType, // WhatsApp
|
||||
DSWebMenuFacebookType, // Facebook
|
||||
DSWebMenuNotiType, // 推送中心
|
||||
};
|
||||
|
||||
@protocol DSWebMenuDelegate <NSObject>
|
||||
|
||||
@@ -48,17 +48,17 @@ static NSString *identifier = @"AvatarCollectionViewCell";
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
return CGSizeMake(collectionView.frame.size.width, ((collectionView.frame.size.height-(self.shareArray.count-1)*10))/self.shareArray.count);
|
||||
return CGSizeMake(60, 60);
|
||||
}
|
||||
|
||||
-(UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section
|
||||
{
|
||||
return UIEdgeInsetsMake(0, 0, 0, 0);
|
||||
return UIEdgeInsetsMake(0, 0, 10, 0);
|
||||
}
|
||||
|
||||
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section
|
||||
{
|
||||
return 10;
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section
|
||||
@@ -106,6 +106,8 @@ static NSString *identifier = @"AvatarCollectionViewCell";
|
||||
cell.avatarImageView.image = [UIImage imageNamed:@"whatsapp"];
|
||||
}else if (type == DSWebMenuFacebookType) {
|
||||
cell.avatarImageView.image = [UIImage imageNamed:@"facebook"];
|
||||
}else if (type == DSWebMenuNotiType) {
|
||||
cell.avatarImageView.image = [UIImage imageNamed:@"noti"];
|
||||
}
|
||||
}
|
||||
cell.avatarImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
|
||||
Reference in New Issue
Block a user