lib/ios/sugarcube-uikit/uifont.rb in sugarcube-2.4.2 vs lib/ios/sugarcube-uikit/uifont.rb in sugarcube-2.5.0
- old
+ new
@@ -1,3 +1,10 @@
class UIFont
- def uifont ; self ; end
+ def uifont(font_size=nil)
+ if font_size.nil?
+ self
+ else
+ font_size = font_size.uifontsize if font_size.respond_to?(:uifontsize)
+ self.fontWithSize(font_size)
+ end
+ end
end