class CALayer
Public Instance Methods
bottom()
click to toggle source
# File lib/purplish-frame/ui/ios/ca_layer.rb, line 17 def bottom frame.origin.y + frame.size.height end
bottom=(bottom)
click to toggle source
# File lib/purplish-frame/ui/ios/ca_layer.rb, line 21 def bottom=(bottom) f = frame f.origin.y = bottom - f.size.height self.frame = f end
center()
click to toggle source
# File lib/purplish-frame/ui/ios/ca_layer.rb, line 2 def center CGPointMake(left+width/2, top+height/2) end
center=(pt)
click to toggle source
# File lib/purplish-frame/ui/ca_layer.rb, line 8 def center=(pt) #We need to check because pt might be HIPoint or some Boxed type pt = pt.to_point if pt.respond_to? :to_point f = frame f.origin.x = pt.x-width/2 f.origin.y = pt.y-height/2 self.frame = f end
height=(height)
click to toggle source
# File lib/purplish-frame/ui/ios/ca_layer.rb, line 27 def height=(height) f = frame f.size.height = height self.frame = f end
top()
click to toggle source
# File lib/purplish-frame/ui/ios/ca_layer.rb, line 7 def top frame.origin.y end
top=(y)
click to toggle source
# File lib/purplish-frame/ui/ios/ca_layer.rb, line 11 def top=(y) f = frame f.origin.y = y self.frame = f end
view_frame()
click to toggle source
# File lib/purplish-frame/ui/ca_layer.rb, line 4 def view_frame frame end