Hero: Swift 4 - iOS 11 - Cascade transitions doesn't work

Created on 13 Oct 2017  路  16Comments  路  Source: HeroTransitions/Hero

Hi,

I'm using Hero in my application and it was working perfectly until iOS 11, I only have one issue though, I'm applying a cascade modifier on the tableView to display the each cells with a delay. I case see the cascade when I build the app on iOS 9 and 10 but not on iOS 11.

Is that a known issue ? Or many something that i'm missing ?

Thanks !
Morgan

reopen if needed

Most helpful comment

Yea, definitely. I will take a look this week.

All 16 comments

this work for me :

        self.tableView.heroModifiers = [.cascade(delta: 2.0, direction: .bottomToTop, delayMatchedViews: true)]

        var i  = 1.0
        for cell in (self.tableView.visibleCells) {

            cell.heroModifiers = [.duration(0.125 * i),.translate(CGPoint.init(x: 0, y: 120))]
            i += 1
        }

Hi @taiphamtiki,

Thank you for your reply. I'm basically doing the same thing but it does not work. Are you testing on iOS 11 ? Which device ?

Thanks,
Morgan

cascade is working for me only when I leave the view controller. I'm setting the hero modifiers into cellForRowAt method of a collectionview... Any help?

Hmm... I will give it a shot with a collectionView. Have you tried using a tableView ? I'm still trying to figure out why this was working on iOS 10 and not iOS 11 anymore...

I can confirm that the cascading effect does not work on a UITableView but it does on a UICollectionView.
The only way to have that effect on tableView cells would be to apply a modifier on each one of them with a delayed ( delta * index ) translate.

I don麓t understand why this is closed. I can reproduce the error with iOS 11 and a UITableView.
Or in other words: What is needed to reopen this :-)

@lkzhao can this issue be re-opened ?

Yea, definitely. I will take a look this week.

Any updates on this issue @lkzhao ?

i know this is not an answer but try version 0.3.6
I had weird rendering problems in v1.0.0 (and up) when i was linking cell view's with VC's view's so ive decided to stick with 0.3.6

PS. 0.3.6 works fine with Xcode9.4 and iOS11

Yes the issue comes from the 1.0.0 release. I'd rather not roll back to previous versions but find a fix for current one :)

Has a fix for this been made yet?

Not that I'm aware of...

I'm unable to use cascate too, but i think that is because the tableView cell are not loaded on the moment that the transition animation occurs, and maybe that moment have changed on iOS 11+

There is not a single cell rendered in viewDidLoad, even you scroll to the position. Try accessing visibleCellson viewDidLayoutSubviews.

Strangely enough, I have set them in almost everywhere in the view lifecycle, but I can only get the cascade animation to work when leaving the view. It seems like the animations are running in viewWillDisappear, but I can't get them to run after populating the datasource and reloading the collectionview. I even tried this hard coding in cells so the view wasn't waiting for a network call to finish. :(

Was this page helpful?
0 / 5 - 0 ratings