Skip to content

Commit

Permalink
fixed merge conflicts round 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Dahan committed Apr 27, 2018
1 parent 515fc80 commit d31c58e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Sources/MotionContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,15 @@ public extension MotionContext {
} else {
snapshot = view.snapshotView() ?? UIView()
}

#endif
}

#if os(tvOS)
if let imageView = view as? UIImageView, imageView.adjustsImageWhenAncestorFocused {
snapshot.frame = imageView.focusedFrameGuide.layoutFrame
}

#endif

view.layer.cornerRadius = oldCornerRadius
Expand Down
20 changes: 10 additions & 10 deletions Sources/Transition/MotionTransition+Start.swift
Original file line number Diff line number Diff line change
Expand Up @@ -238,18 +238,18 @@ fileprivate extension MotionTransition {
func processAnimation() {
#if os(tvOS)
animate()

#else
if isNavigationController {
// When animating within navigationController, we have to dispatch later into the main queue.
// otherwise snapshots will be pure white. Possibly a bug with UIKit
Motion.async { [weak self] in
self?.animate()
if isNavigationController {
// When animating within navigationController, we have to dispatch later into the main queue.
// otherwise snapshots will be pure white. Possibly a bug with UIKit
Motion.async { [weak self] in
self?.animate()
}

} else {
animate()
}

} else {
animate()
}

#endif
}
Expand Down

0 comments on commit d31c58e

Please sign in to comment.