集合视图中图像单元格的内部阴影

时间:2015-03-05 08:50:37

标签: ios objective-c uicollectionviewcell

我有一个集合视图,当我选择一个单元格时,我希望有一个内部阴影。我正在尝试这个:

UICollectionViewCell  *cell = [collectionView cellForItemAtIndexPath:indexPath];
        recipeImageView = (UIImageView *)[cell viewWithTag:100];
        recipeImageView.frame=CGRectMake(recipeImageView.frame.origin.x, recipeImageView.frame.origin.y, 120, 120);
        backgroundImage= (UIImageView *)[cell viewWithTag:100];
        backgroundImage.image=[UIImage imageNamed:@"layout-2015-03-05-093344.png"];

但即使我的图片具有透明背景,第一张图片也不可见。

0 个答案:

没有答案
相关问题