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
I try make the snapshots in dismiss animation have blurEffect and corner. let snapshot = (fromViewSnapshot!.resizableSnapshotView(from: snapshotRegion, afterScreenUpdates: false, withCapInsets: UIEdgeInsets.zero))!
blurEffect: I just add UIVisualEffectView to fromView and then let fromViewSnapshot = fromView?.snapshotView(afterScreenUpdates: true)
this work well. all snapshot blurEffect.
but make snapshot corner I fail.
first i just use this snapshot.layer.cornerRadius = width / 2 snapshot.layer.masksToBounds = true
but this have performance problems.
I try to solve this by use UIGraphicsGetCurrentContext clip the snapshot. by use
first. clip snapshot to image like http://stackoverflow.com/questions/25444609/screenshot-in-swift-ios. then clip image. and add image to imageview. at last. add it to containerView
but it not work. I do not know where is wrong.
sorry about my poor English.
The text was updated successfully, but these errors were encountered:
I try make the snapshots in dismiss animation have blurEffect and corner.
let snapshot = (fromViewSnapshot!.resizableSnapshotView(from: snapshotRegion, afterScreenUpdates: false, withCapInsets: UIEdgeInsets.zero))!
blurEffect: I just add UIVisualEffectView to fromView and then
let fromViewSnapshot = fromView?.snapshotView(afterScreenUpdates: true)
this work well. all snapshot blurEffect.
but make snapshot corner I fail.
first i just use this
snapshot.layer.cornerRadius = width / 2
snapshot.layer.masksToBounds = true
but this have performance problems.
I try to solve this by use UIGraphicsGetCurrentContext clip the snapshot. by use
first. clip snapshot to image like http://stackoverflow.com/questions/25444609/screenshot-in-swift-ios. then clip image. and add image to imageview. at last. add it to containerView
but it not work. I do not know where is wrong.
sorry about my poor English.
The text was updated successfully, but these errors were encountered: