Compare commits

...
2 Commits
Author SHA1 Message Date
Abdurahim Jauzee 77e99b8708 update podspec 2017-05-31 12:41:22 +03:00
Abdurahim Jauzee 5254378736 remove unnecessary guard statement 2017-05-31 12:39:34 +03:00
2 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FoldingCell'
s.version = '2.1.1'
s.version = '2.1.2'
s.summary = 'UITableViewCell with folding animation.'
s.homepage = 'https://github.com/Ramotion/folding-cell'
s.license = 'MIT'
+2 -6
View File
@@ -506,16 +506,12 @@ extension RotatedView: CAAnimationDelegate {
extension UIView {
func pb_takeSnapshot(_ frame: CGRect) -> UIImage? {
UIGraphicsBeginImageContextWithOptions(frame.size, false, 0.0)
UIGraphicsBeginImageContextWithOptions(frame.size, false, 0)
guard let context = UIGraphicsGetCurrentContext() else { return nil }
context.translateBy(x: frame.origin.x * -1, y: frame.origin.y * -1)
guard let currentContext = UIGraphicsGetCurrentContext() else {
return nil
}
self.layer.render(in: currentContext)
layer.render(in: context)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()