You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's working fine while i present the controller and presented Hero View springs well and fine. But while i am dismissing the view controller, dismissed Hero View doesn't springs. I am presenting the view from collectionview cell and dismissing to same view from ViewProduct named View.
It's working fine while i present the controller and presented Hero View springs well and fine. But while i am dismissing the view controller, dismissed Hero View doesn't springs. I am presenting the view from collectionview cell and dismissing to same view from ViewProduct named View.
I am ussing below code for this.
While presenting :-
CellForItemAt(){
cell.HeroId = "Cell(indexpath.row)"
}
DidSelectItemAt(){
let indxPath = IndexPath(row: indexPath.item, section: 0)
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ProductListCollectionViewCell", for: indxPath) as! ProductListCollectionViewCell
LocalStore.shared.HeroID = "Cell(indexPath.row + 1)"
cell.hero.modifiers = [.useNoSnapshot, .spring(stiffness: 250, damping: 15)]
self.performSegue(withIdentifier: "second", sender: self)
}
Dismiss ViewController:-
viewDidLoad(){
viewProduct.heroModifiers = [.forceNonFade, .spring(stiffness: 250, damping: 15), .useGlobalCoordinateSpace]
}
DimissAction(){
let currentPosition = CGPoint(x: translation.x + viewProduct.center.x, y: translation.y * (1.0 - progress) + viewProduct.center.y)
let modifiers: [HeroModifier] = [.position(currentPosition), .forceNonFade, .opacity(0.99), .cornerRadius(20), .spring(stiffness: 250, damping: 15), .useGlobalCoordinateSpace]
Hero.shared.apply(modifiers: modifiers, to: viewProduct)
hero.dismissViewController()
}
RPReplay_Final1689752948.MP4
The text was updated successfully, but these errors were encountered: