mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-03 07:06:04 +00:00
Fix ios/objective-c types and errors/red boxes.
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
CGMutablePathRef path = CGPathCreateMutable();
|
||||
NSArray<NSTextCheckingResult *>* results = [_pathRegularExpression matchesInString:_d options:0 range:NSMakeRange(0, [_d length])];
|
||||
_bezierCurves = [[NSMutableArray alloc] init];
|
||||
int count = [results count];
|
||||
unsigned long count = [results count];
|
||||
|
||||
if (count) {
|
||||
NSUInteger i = 0;
|
||||
|
||||
@@ -19,7 +19,9 @@ static NSRegularExpression* percentageRegExp;
|
||||
|
||||
+ (CGFloat)stringToFloat:(NSString *)string relative:(CGFloat)relative offset:(CGFloat)offset
|
||||
{
|
||||
if (![self isPercentage:string]) {
|
||||
if (string == nil) {
|
||||
return offset;
|
||||
} else if (![self isPercentage:string]) {
|
||||
return [string floatValue] + offset;
|
||||
} else {
|
||||
return [self percentageToFloat:string relative:relative offset:offset];
|
||||
|
||||
Reference in New Issue
Block a user