lib/ios/sugarcube-uikit/uiview.rb in sugarcube-2.0.2 vs lib/ios/sugarcube-uikit/uiview.rb in sugarcube-2.1.0

- old
+ new

@@ -76,23 +76,22 @@ # # It is guaranteed that `true` and `:all` will always have this behavior. In # the future, if this argument becomes something that accepts multiple values, # those two are sacred. def uiimage(use_content_size=false) - scale = UIScreen.mainScreen.scale if use_content_size - UIGraphicsBeginImageContextWithOptions(contentSize, false, scale) + UIGraphicsBeginImageContextWithOptions(contentSize, false, 0.0) context = UIGraphicsGetCurrentContext() self.subviews.each do |subview| CGContextSaveGState(context) CGContextTranslateCTM(context, subview.frame.origin.x, subview.frame.origin.y) subview.layer.renderInContext(context) CGContextRestoreGState(context) end image = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() else - UIGraphicsBeginImageContextWithOptions(bounds.size, false, scale) + UIGraphicsBeginImageContextWithOptions(bounds.size, false, 0.0) if self.respond_to?('drawViewHierarchyInRect:afterScreenUpdates:') self.drawViewHierarchyInRect(self.bounds, afterScreenUpdates: true) else layer.renderInContext(UIGraphicsGetCurrentContext()) end