motion-prime/views/view_styler.rb in motion-prime-0.5.1 vs motion-prime/views/view_styler.rb in motion-prime-0.5.2
- old
+ new
@@ -104,12 +104,12 @@
mask_layer.frame = bounds
mask_layer.path = mask_path.CGPath
view.mask = mask_layer
elsif key == 'attributed_text_options'
attributes = {}
- if line_spacing = value[:line_spacing]
+ if line_spacing = value[:line_spacing] || line_height = value[:line_height]
paragrahStyle = NSMutableParagraphStyle.alloc.init
- paragrahStyle.setLineSpacing(line_spacing)
+ line_height ? paragrahStyle.setMinimumLineHeight(line_height) : paragrahStyle.setLineSpacing(line_spacing)
attributes[NSParagraphStyleAttributeName] = paragrahStyle
end
attributedString = NSAttributedString.alloc.initWithString(value[:text], attributes: attributes)
if underline_range = value[:underline]
\ No newline at end of file