Sha256: 3cfb6fdc5fdd765f8ca070d6d8df0048fab5b0874c23450425162192dcb5e803
Contents?: true
Size: 573 Bytes
Versions: 18
Compression:
Stored size: 573 Bytes
Contents
# @requires MotionKit::UIViewLayout module MotionKit class UIViewLayout # gradient colors: def gradient(&block) gradient_layer = target.motion_kit_meta[:motionkit_gradient_layer] || begin gradient_layer = CAGradientLayer.layer gradient_layer.frame = CGRect.new([0, 0], target.frame.size) target.layer.insertSublayer(gradient_layer, atIndex:0) target.motion_kit_meta[:motionkit_gradient_layer] = gradient_layer gradient_layer end context(gradient_layer, &block) gradient_layer end end end
Version data entries
18 entries across 18 versions & 1 rubygems