lib/teacup/calculations.rb in teacup-1.3.4 vs lib/teacup/calculations.rb in teacup-2.0.0
- old
+ new
@@ -8,12 +8,12 @@
offset = amount[(location+1)..-1].gsub(' ', '').to_f
percent = amount[0...location].to_f / 100.0
case dimension
when :width
- CGRectGetWidth(view.superview.bounds) * percent + offset
+ view.superview.bounds.size.width * percent + offset
when :height
- CGRectGetHeight(view.superview.bounds) * percent + offset
+ view.superview.bounds.size.height * percent + offset
else
raise "Unknown dimension #{dimension}"
end
else
amount