Sha256: 2eb0acf33e985aae717d41455e75a60a83578a663d7698c6941fd92a46638208

Contents?: true

Size: 388 Bytes

Versions: 1

Compression:

Stored size: 388 Bytes

Contents

module ProMotion
  class MeasureHelper
    class << self
      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
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ProMotion-0.3.0 lib/ProMotion/helpers/MeasureHelper.rb