File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,13 @@ - (UIColor *)colorWithString:(NSString *)string
186186 if ([components count ] > 3 ) {
187187 alpha = [[components[3 ] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceCharacterSet ]] floatValue ];
188188 }
189+
190+ // Return clear color if the alpha of the value supplied is 0.
191+ // We internally check for clearColor when saving colors for the last used color. See #20042
192+ if (alpha == 0 ) {
193+ return [UIColor clearColor ];
194+ }
195+
189196 if ([components count ] > 2 ) {
190197 NSString *red = [components[0 ] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceCharacterSet ]];
191198 NSString *green = [components[1 ] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceCharacterSet ]];
You can’t perform that action at this time.
0 commit comments