android 隐藏下边框线,如何删除uiCollectionView单元格中具有透明背景的下边框线?...

我试图删除CollectionView单元格下边框,但没有运气。

随附我的样本代码:

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {

UICollectionViewCell *gridcell = nil;

MenuDetail_Cell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:MenuDetail_CellID forIndexPath:indexPath];

cell.layoutMargins = UIEdgeInsetsZero;

cell.layer.borderWidth = 0;

cell.clipsToBounds = YES;

cell.contentView.layer.borderWidth = 0.0;

cell.contentView.layer.borderColor = [UIColor clearColor].CGColor;

cell.contentView.layer.masksToBounds = NO;

cell.strMenuImage = self.imageArray[indexPath.row];

cell.strMenuTitle = self.titleArray[indexPath.row];

gridcell = cell;

return gridcell;

}

- (UICollectionView *)collectionView

{

if (!_collectionView) {

UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc]init];

_collectionView = [[UICollectionView alloc]initWithFrame:CGRectZero collectionViewLayout:layout];

_collectionView.delegate = self;

_collectionView.dataSource = self;

_collectionView.delaysContentTouches = NO;

_collectionView.frame = CGRectMake(0, DCTopNavH, ScreenW, ScreenH - DCBottomTabH);

_collectionView.showsVerticalScrollIndicator = NO;

//Cell

[_collectionView registerClass:[MenuDetail_Cell class] forCellWithReuseIdentifier:MenuDetail_CellID];

[self.view addSubview:_collectionView];

}

return _collectionView;

}

甚至我也试着申请minimumLineSpacingForSectionAtIndex但还是一样。

有什么想法吗?如果我犯了什么愚蠢的错误,我很抱歉。谢谢您。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值