Commit ecaa746404f2080eafff90651e5a6e8f56f023e9

Authored by “张旭”
1 parent 3a35e20a

更改转场动画消失的效果

metaCode/Classes/Main/HomePages/Controller/AuthController/push相关/CNHomePageAnimationTransition.swift
... ... @@ -69,12 +69,12 @@ 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   - UIView.animate(withDuration: transitonDuration - 0.3, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: {
  72 + UIView.animate(withDuration: transitonDuration - 0.8, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: {
73 73 let frame = selectedCell.convert(selectedCell.totalView.frame, to: toVC.view)
74 74 fromVC.view.frame = frame
75 75 fromVC.view.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius
76 76 fromVC.closeBtn.alpha = 0
77   -
  77 + fromVC.tableView.alpha = 0
78 78 }) { (completed) in
79 79 transitionContext.completeTransition(completed)
80 80 }
... ...
metaCode/Classes/Main/Util/CNUpSlideAnimationTransition.swift
... ... @@ -151,26 +151,26 @@ extension CNUpSlideAnimationTransition: UIViewControllerAnimatedTransitioning {
151 151 guard let selectedCell = toVC.selectedCell else { return }
152 152 let fromVC = fromNaviVC.topViewController as! CNUpSlideDetailViewController
153 153  
154   - UIView.animate(withDuration: transitonDuration - 0.3, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: {
  154 + UIView.animate(withDuration: transitonDuration - 0.8, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: {
155 155 let frame = selectedCell.convert(selectedCell.bgBackView.frame, to: toVC.view)
156 156 fromVC.view.frame = frame
157 157 fromVC.view.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius
158 158 fromVC.scrollView.imageView.frame.size.width = GlobalConstants.todayCardSize.width
159 159 fromVC.scrollView.imageView.frame.size.height = GlobalConstants.todayCardSize.height
160 160 fromVC.closeBtn.alpha = 0
161   -
  161 + fromVC.tableView.alpha = 0
162 162 }) { (completed) in
163 163 transitionContext.completeTransition(completed)
164 164 }
165 165 }else if fromNaviVC.topViewController is CNHomepageDuanJuDetailViewController{
166 166 guard let selectedCell = toVC.selectedDuanjuCell else { return }
167 167 let fromVC = fromNaviVC.topViewController as! CNHomepageDuanJuDetailViewController
168   - UIView.animate(withDuration: transitonDuration - 0.3, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: {
  168 + UIView.animate(withDuration: transitonDuration - 0.8, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: {
169 169 let frame = selectedCell.convert(selectedCell.totalView.frame, to: toVC.view)
170 170 fromVC.view.frame = frame
171 171 fromVC.view.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius
172 172 fromVC.closeBtn.alpha = 0
173   -
  173 + fromVC.tableView.alpha = 0
174 174 }) { (completed) in
175 175 transitionContext.completeTransition(completed)
176 176 }
... ... @@ -185,14 +185,14 @@ extension CNUpSlideAnimationTransition: UIViewControllerAnimatedTransitioning {
185 185 guard let selectedCell = toVC.selectedCell else { return }
186 186 let fromVC = fromNaviVC.topViewController as! CNUpSlideDetailViewController
187 187  
188   - UIView.animate(withDuration: transitonDuration - 0.3, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: {
  188 + UIView.animate(withDuration: transitonDuration - 0.8, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: {
189 189 let frame = selectedCell.convert(selectedCell.bgBackView.frame, to: toVC.view)
190 190 fromVC.view.frame = frame
191 191 fromVC.view.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius
192 192 fromVC.scrollView.imageView.frame.size.width = GlobalConstants.todayCardSize.width
193 193 fromVC.scrollView.imageView.frame.size.height = GlobalConstants.todayCardSize.height
194 194 fromVC.closeBtn.alpha = 0
195   -
  195 + fromVC.tableView.alpha = 0
196 196 }) { (completed) in
197 197 transitionContext.completeTransition(completed)
198 198 }
... ... @@ -205,14 +205,14 @@ extension CNUpSlideAnimationTransition: UIViewControllerAnimatedTransitioning {
205 205 guard let selectedCell = toVC.selectedCell else { return }
206 206 if fromNaviVC.topViewController is CNUpSlideDetailViewController{
207 207 let fromVC = fromNaviVC.topViewController as! CNUpSlideDetailViewController
208   - UIView.animate(withDuration: transitonDuration - 0.3, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: {
  208 + UIView.animate(withDuration: transitonDuration - 0.8, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: {
209 209 let frame = selectedCell.convert(selectedCell.bgBackView.frame, to: toVC.view)
210 210 fromVC.view.frame = frame
211 211 fromVC.view.layer.cornerRadius = GlobalConstants.toDayCardCornerRadius
212 212 fromVC.scrollView.imageView.frame.size.width = GlobalConstants.todayCardSize.width
213 213 fromVC.scrollView.imageView.frame.size.height = GlobalConstants.todayCardSize.height
214 214 fromVC.closeBtn.alpha = 0
215   -
  215 + fromVC.tableView.alpha = 0
216 216 }) { (completed) in
217 217 transitionContext.completeTransition(completed)
218 218 }
... ...