Method: MotionKit::NSViewHelpers#from_bottom

Defined in:
lib/motion-kit-osx/helpers/nsview_frame_helpers.rb

#from_bottom(from_view = nil, f = nil) ⇒ Object

The first arg can be a view or a frame

Examples:

frame from_bottom(width: 80, height: 22)
frame from_bottom(another_view, width: 80, height: 22)


316
317
318
319
320
321
322
323
324
# File 'lib/motion-kit-osx/helpers/nsview_frame_helpers.rb', line 316

def from_bottom(from_view=nil, f=nil)
  if from_view.is_a?(Hash)
    f = from_view
    from_view = nil
  end
  f ||= {}
  from_view ||= target.superview
  _calculate_frame(f, from: from_view, relative_to: { x: :mid, y: :min })
end