Aug 16 18:14:15 marafon systemd[1]: Closed Load/Save RF Kill Switch Status /dev/rfkill Watch.
Aug 16 18:14:15 marafon systemd[1]: Stopping User Manager for UID 0...
Aug 16 18:14:15 marafon systemd[1]: Stopped target Graphical Interface.
Aug 16 18:14:15 marafon systemd[1]: Stopping Authorization Manager...
Aug 16 18:14:32 marafon kernel: [ 0.000000] Linux version 4.15.0-112-generic (buildd@lcy01-amd64-027) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 (Ubuntu 4.15.0-112.113-generic 4.15.18)
guard let fromVC = transitionContext.viewController(forKey: .from),
let fromSnapshot = fromVC.view.snapshotView(afterScreenUpdates: false),
let toVC = transitionContext.viewController(forKey: .to),
let toSnapshot = toVC.view.snapshotView(afterScreenUpdates: true)
else {
return
}
let containerView = transitionContext.containerView
containerView.addSubview(toVC.view)
let blackView = UIView(frame: containerView.frame)
blackView.backgroundColor = .black
containerView.addSubview(blackView)
containerView.addSubview(fromSnapshot)
containerView.addSubview(toSnapshot)
toSnapshot.frame.origin.x = containerView.frame.width
toSnapshot.frame.origin.y = -containerView.frame.height
UIView.animate(withDuration: duration, delay: 0, options: [.curveEaseInOut], animations: {
fromSnapshot.frame.origin.x = -containerView.frame.width
fromSnapshot.frame.origin.y = containerView.frame.height
toSnapshot.frame.origin = .zero
}) { _ in
blackView.removeFromSuperview()
fromSnapshot.removeFromSuperview()
toSnapshot.removeFromSuperview()
transitionContext.completeTransition(!transitionContext.transitionWasCancelled)
}
func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
guard let fromVC = transitionContext.viewController(forKey: .from),
let fromSnapshot = fromVC.view.snapshotView(afterScreenUpdates: false),
let toVC = transitionContext.viewController(forKey: .to),
let toSnapshot = toVC.view.snapshotView(afterScreenUpdates: true)
else {
return
}
let containerView = transitionContext.containerView
containerView.addSubview(fromSnapshot)
containerView.addSubview(toSnapshot)
toSnapshot.frame.origin.x = containerView.frame.width
toSnapshot.frame.origin.y = -containerView.frame.height
fromVC.view.isHidden = true
UIView.animate(withDuration: duration, delay: 0, options: [.curveEaseInOut], animations: {
fromSnapshot.frame.origin.x = -containerView.frame.width
fromSnapshot.frame.origin.y = containerView.frame.height
toSnapshot.frame.origin = .zero
}) { _ in
containerView.addSubview(toVC.view)
fromSnapshot.removeFromSuperview()
toSnapshot.removeFromSuperview()
transitionContext.completeTransition(!transitionContext.transitionWasCancelled)
}
}
func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
guard let fromVC = transitionContext.viewController(forKey: .from),
let fromSnapshot = fromVC.view.snapshotView(afterScreenUpdates: true),
let toVC = transitionContext.viewController(forKey: .to),
let toSnapshot = toVC.view.snapshotView(afterScreenUpdates: true)
else {
return
}
let containerView = transitionContext.containerView
toSnapshot.frame.origin.x = containerView.frame.width
containerView.addSubview(fromSnapshot)
containerView.addSubview(toVC.view)
containerView.addSubview(toSnapshot)
fromVC.view.isHidden = true
toVC.view.isHidden = true
UIView.animate(withDuration: duration, delay: 0, options: [.curveEaseInOut], animations: {
fromSnapshot.frame.origin.x = -(containerView.frame.width / 2.0)
toSnapshot.frame.origin.x = 0
}) { _ in
toVC.view.isHidden = false
fromSnapshot.removeFromSuperview()
toSnapshot.removeFromSuperview()
transitionContext.completeTransition(!transitionContext.transitionWasCancelled)
}
}
extension UIView {
// Replacement of `snapshotView` on iOS 10.
// Fixes the issue of `snapshotView` returning a blank white screen.
func snapshotImageView() -> UIImageView? {
UIGraphicsBeginImageContextWithOptions(bounds.size, true, 1)
guard let context = UIGraphicsGetCurrentContext() else {
return nil
}
layer.render(in: context)
let viewImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return UIImageView(image: viewImage, highlightedImage: viewImage)
}
}
Проблема была в сервисе под пользователем app (laravel horizon) - долго завершался.
А спасибо, за то что подсказали, как включать детальные логи - не пригодилось, но на будущее буду иметь введу:)