Method: ProMotion::Styling#content_height

Defined in:
lib/ProMotion/view/styling.rb

#content_height(view) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/ProMotion/view/styling.rb', line 45

def content_height(view)
  height = 0
  view.subviews.each do |sub_view|
    next if sub_view.isHidden
    y = sub_view.frame.origin.y
    h = sub_view.frame.size.height
    if (y + h) > height
      height = y + h
    end
  end
  height
end