Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Support transparent or clear string to UIColor

  • Loading branch information...
commit 98356d7c1da43d03c8854127c6c736c8c51a93b5 1 parent fbd779f
@seanhotw seanhotw authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/simple_view/extensions/string.rb
View
1  lib/simple_view/extensions/string.rb
@@ -20,6 +20,7 @@ def to_color
when 6
colours = html_colour.scan(%r<[0-9A-Fa-f]{2}>).map { |el| el.to_i(16) }
else
@siuying
siuying added a note

do you mean ...

return ::UIColor.clearColor if html_colour == 'transparent' || html_colour == 'clear'

here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ return ::UIColor.clearColor if html_colour == 'transparent' || 'clear'
raise ArgumentError
end
Please sign in to comment.
Something went wrong with that request. Please try again.