motion-prime/views/view_styler.rb in motion-prime-0.3.1 vs motion-prime/views/view_styler.rb in motion-prime-0.3.2
- old
+ new
@@ -34,10 +34,11 @@
if width.nil? && height.nil? && right.nil? && bottom.nil?
options[:frame] = bounds
else
frame = CGRectZero
+
max_width = bounds.size.width
max_height = bounds.size.height
width = 0.0 if width.nil?
height = 0.0 if height.nil?
@@ -105,10 +106,13 @@
def setValue(value, forUndefinedKey: key)
# return if value.nil?
# ignore options
return if key == 'size_to_fit' && view.is_a?(UILabel)
return if (key == 'url' || key == 'default') && view.is_a?(UIImageView)
- return if %w[max_width min_width height_to_fit container].include? key.to_s
+ return if %w[
+ max_width max_outer_width min_width min_outer_width
+ max_height max_outer_height min_height min_outer_width
+ height_to_fit container].include? key.to_s
# apply options
if key.end_with?('title_color')
view.setTitleColor value.uicolor, forState: UIControlStateNormal
elsif key.end_with?('alignment') && value.is_a?(Symbol)
\ No newline at end of file