lib/ios/sugarcube-568/uiimage.rb in sugarcube-2.12.3 vs lib/ios/sugarcube-568/uiimage.rb in sugarcube-3.0.0

- old
+ new

@@ -1,18 +1,21 @@ class UIImage class << self SugarCube568_TallSuffix = '-568h@2x' # 320 x 568 SugarCube667_TallSuffix = '-667h@2x' # 375 x 667 SugarCube736_TallSuffix = '-736h@2x' # 414 x 736 + SugarCube1024_TallSuffix = '-1024h@2x' # 768 x 1024 def sugarcube568_imageNamed(name) case UIScreen.mainScreen.bounds.size.height when 568 taller_image_ext = SugarCube568_TallSuffix when 667 taller_image_ext = SugarCube667_TallSuffix when 736 taller_image_ext = SugarCube736_TallSuffix + when 1024 + taller_image_ext = SugarCube1024_TallSuffix else taller_image_ext = false end if ( taller_image_ext && name.length > 0 && name.rangeOfString(taller_image_ext).location == NSNotFound )