iOS: ensure start & end are not nil
This commit is contained in:
parent
9fb84162ad
commit
d060e1427c
@ -348,12 +348,14 @@ - (void)requestLayout {
|
||||
[colors addObject:(__bridge id) DoricColor(obj).CGColor];
|
||||
}];
|
||||
} else {
|
||||
if ([dict objectForKey:@"start"] != nil && [dict objectForKey:@"end"] != nil) {
|
||||
UIColor *start = DoricColor(dict[@"start"]);
|
||||
UIColor *end = DoricColor(dict[@"end"]);
|
||||
|
||||
[colors addObject:(__bridge id) start.CGColor];
|
||||
[colors addObject:(__bridge id) end.CGColor];
|
||||
}
|
||||
}
|
||||
|
||||
int orientation = [dict[@"orientation"] intValue];
|
||||
CGPoint startPoint;
|
||||
|
Reference in New Issue
Block a user