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