4

I have widget with collection of icons and these icons are on transparent background. UICollectionViewCell is also transparent. The problem is that if press on transparent part of the cell -

(void)collectionView:didSelectItemAtIndexPath:

is not called. But if change cell's backgroundView to black color with alpha = 0.01 everything works well. I have a feeling that alpha solution is not the best one. Am I doing something wrong or anybody have better solution?

Collection views with alpha = 0.01

zaplitny
  • 416
  • 4
  • 19
  • Possibly related: http://stackoverflow.com/questions/26223537/ios-today-extension-table-view-rows-only-detects-taps-on-a-label – Jesse Rusak Nov 12 '14 at 16:51

2 Answers2

3

You NEED the 0.01 alpha workaround.

According to Apple's DTS, it is an iOS 8 bug.

EduAlm
  • 813
  • 3
  • 11
  • 27
0

The solution for the moment is to create a empty text label as a background view, or add it in the .xib file as a first view.

Constantin Saulenco
  • 2,353
  • 1
  • 22
  • 44