Commit dfe5ed8e08e9524eb62149a22dd20dc162e7a474
1 parent
9d95b889
取消 区块dismiss动画
Showing
2 changed files
with
8 additions
and
3 deletions
metaCode/Classes/Main/HomePages/Controller/AuthController/push相关/CNHomePageAnimationTransition.swift
| ... | ... | @@ -69,12 +69,14 @@ extension CNHomePageAnimationTransition: UIViewControllerAnimatedTransitioning { |
| 69 | 69 | if fromNaviVC.topViewController is CNHomepageDuanJuDetailViewController{ |
| 70 | 70 | guard let selectedCell = toVC.selectedDuanjuCell else { return } |
| 71 | 71 | let fromVC = fromNaviVC.topViewController as! CNHomepageDuanJuDetailViewController |
| 72 | + | |
| 73 | + fromVC.view.isHidden = true | |
| 72 | 74 | UIView.animate(withDuration: transitonDuration - 0.8, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: { |
| 73 | 75 | let frame = selectedCell.convert(selectedCell.totalView.frame, to: toVC.view) |
| 74 | 76 | fromVC.view.frame = frame |
| 75 | 77 | fromVC.view.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius |
| 76 | 78 | fromVC.closeBtn.alpha = 0 |
| 77 | - fromVC.tableView.alpha = 0 | |
| 79 | + | |
| 78 | 80 | }) { (completed) in |
| 79 | 81 | transitionContext.completeTransition(completed) |
| 80 | 82 | } | ... | ... |
metaCode/Classes/Main/Util/CNUpSlideAnimationTransition.swift
| ... | ... | @@ -150,6 +150,7 @@ extension CNUpSlideAnimationTransition: UIViewControllerAnimatedTransitioning { |
| 150 | 150 | if fromNaviVC.topViewController is CNUpSlideDetailViewController{ |
| 151 | 151 | guard let selectedCell = toVC.selectedCell else { return } |
| 152 | 152 | let fromVC = fromNaviVC.topViewController as! CNUpSlideDetailViewController |
| 153 | + fromVC.view.isHidden = true | |
| 153 | 154 | |
| 154 | 155 | UIView.animate(withDuration: transitonDuration - 0.8, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: { |
| 155 | 156 | let frame = selectedCell.convert(selectedCell.bgBackView.frame, to: toVC.view) |
| ... | ... | @@ -158,13 +159,14 @@ extension CNUpSlideAnimationTransition: UIViewControllerAnimatedTransitioning { |
| 158 | 159 | fromVC.scrollView.imageView.frame.size.width = GlobalConstants.todayCardSize.width |
| 159 | 160 | fromVC.scrollView.imageView.frame.size.height = GlobalConstants.todayCardSize.height |
| 160 | 161 | fromVC.closeBtn.alpha = 0 |
| 161 | - fromVC.tableView.alpha = 0 | |
| 162 | + | |
| 162 | 163 | }) { (completed) in |
| 163 | 164 | transitionContext.completeTransition(completed) |
| 164 | 165 | } |
| 165 | 166 | }else if fromNaviVC.topViewController is CNHomepageDuanJuDetailViewController{ |
| 166 | 167 | guard let selectedCell = toVC.selectedDuanjuCell else { return } |
| 167 | 168 | let fromVC = fromNaviVC.topViewController as! CNHomepageDuanJuDetailViewController |
| 169 | + fromVC.view.isHidden = true | |
| 168 | 170 | UIView.animate(withDuration: transitonDuration - 0.8, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: { |
| 169 | 171 | let frame = selectedCell.convert(selectedCell.totalView.frame, to: toVC.view) |
| 170 | 172 | fromVC.view.frame = frame |
| ... | ... | @@ -184,7 +186,7 @@ extension CNUpSlideAnimationTransition: UIViewControllerAnimatedTransitioning { |
| 184 | 186 | guard let toVC = transitionContext.viewController(forKey: .to) as? CNUpSlideViewController else { return } |
| 185 | 187 | guard let selectedCell = toVC.selectedCell else { return } |
| 186 | 188 | let fromVC = fromNaviVC.topViewController as! CNUpSlideDetailViewController |
| 187 | - | |
| 189 | + fromVC.view.isHidden = true | |
| 188 | 190 | UIView.animate(withDuration: transitonDuration - 0.8, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: { |
| 189 | 191 | let frame = selectedCell.convert(selectedCell.bgBackView.frame, to: toVC.view) |
| 190 | 192 | fromVC.view.frame = frame |
| ... | ... | @@ -205,6 +207,7 @@ extension CNUpSlideAnimationTransition: UIViewControllerAnimatedTransitioning { |
| 205 | 207 | guard let selectedCell = toVC.selectedCell else { return } |
| 206 | 208 | if fromNaviVC.topViewController is CNUpSlideDetailViewController{ |
| 207 | 209 | let fromVC = fromNaviVC.topViewController as! CNUpSlideDetailViewController |
| 210 | + fromVC.view.isHidden = true | |
| 208 | 211 | UIView.animate(withDuration: transitonDuration - 0.8, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: { |
| 209 | 212 | let frame = selectedCell.convert(selectedCell.bgBackView.frame, to: toVC.view) |
| 210 | 213 | fromVC.view.frame = frame | ... | ... |