• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UICollectionView not obeying zIndex of UICollectionViewLayoutAttributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UICollectionView not obeying zIndex of UICollectionViewLayoutAttributes


  • Subject: Re: UICollectionView not obeying zIndex of UICollectionViewLayoutAttributes
  • From: Luke Hiesterman <email@hidden>
  • Date: Thu, 06 Aug 2015 15:42:10 +0000
  • Thread-topic: UICollectionView not obeying zIndex of UICollectionViewLayoutAttributes

Can you post your implementations -layoutAttributesForElementsInRect: as well as -layoutAttributesForItemAtIndexPath:?

Luke

> On Aug 6, 2015, at 8:09 AM, Ted Bradley <email@hidden> wrote:
>
> The effect I'm trying to achieve is a kind of sticky header cell. It's important to me that the sticky cell floats over the top of the others. Something a bit like this:
>
>   ┌──────────┐
>   │          │
>   │  Cell 0  │
>   │          ├┐
>   └┬─────────┘│
>    │  Cell 4  │
>    │          │
>    └──────────┘
>    ┌──────────┐
>    │          │
>    │  Cell 5  │
>    │          │
>    └──────────┘
>    ┌──────────┐
>    │          │
>    │  Cell 6  │
>    │          │
>    └──────────┘
> Cell 4, 5 and 6 would normally viewable and I'm constructing the attributes for cell 0 in my UICollectionViewFlowLayout subclass during layoutAttributesForElementsInRect:. All I do is call the super implementation, determine which cell I need to add in and then construct the UICollectionViewLayoutAttributes(forCellWithIndexPath:). I then set the zIndex for it to 1 (default is `0`).
>
> The problem I'm getting is that the UICollectionView seems to always ignore the `zIndex`
>
>   ┌──────────┐
>   │          │
>   │  Cell 0  │
>   │┌─────────┴┐
>   └┤          │
>    │  Cell 4  │
>    │          │
>    └──────────┘
>    ┌──────────┐
>    │          │
>    │  Cell 5  │
>    │          │
>    └──────────┘
>    ┌──────────┐
>    │          │
>    │  Cell 6  │
>    │          │
>    └──────────┘
>
> Now I believe it's possible to visually sort this out using a 3d transform, but that doesn't work for me as I don't want any taps going to the cell which is over the top. So in this example I don't want Cell 4 receiving taps intended for Cell 0.
>
> Does anyone have any ideas? This is on iOS 8.4.
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: UICollectionView not obeying zIndex of UICollectionViewLayoutAttributes
      • From: Ted Bradley <email@hidden>
References: 
 >UICollectionView not obeying zIndex of UICollectionViewLayoutAttributes (From: Ted Bradley <email@hidden>)

  • Prev by Date: Re: User Default Controller in NIB - subclass to use the suite instead
  • Next by Date: Re: Swift enums and NSNotificationCenter
  • Previous by thread: UICollectionView not obeying zIndex of UICollectionViewLayoutAttributes
  • Next by thread: Re: UICollectionView not obeying zIndex of UICollectionViewLayoutAttributes
  • Index(es):
    • Date
    • Thread