[ios] Upgrade project version, fix warnings and types

This commit is contained in:
Mikael Sand
2018-10-19 03:52:04 +03:00
parent 31d9bb9f41
commit 1e0a9ba5ff
4 changed files with 30 additions and 31 deletions
+11 -16
View File
@@ -874,29 +874,24 @@ static double RNSVGTSpan_radToDeg = 180 / M_PI;
lines = nil;
lengths = nil;
textPath = nil;
[self traverseTextSuperviews:^(__kindof RNSVGText *node) {
if ([node class] == [RNSVGTextPath class]) {
textPath = (RNSVGTextPath*) node;
[textPath getPathLength:&_pathLength lineCount:&lineCount lengths:&lengths lines:&lines isClosed:&isClosed];
return NO;
}
return YES;
}];
}
- (void)traverseTextSuperviews:(BOOL (^)(__kindof RNSVGText *node))block
{
RNSVGText *targetView = self;
BOOL result = block(self);
while (targetView && [targetView class] != [RNSVGText class] && result) {
while (targetView && [targetView class] != [RNSVGText class]) {
if (![targetView isKindOfClass:[RNSVGText class]]) {
//todo: throw exception here
break;
return;
}
targetView = (RNSVGText*)[targetView superview];
result = block(targetView);
if ([targetView class] == [RNSVGTextPath class]) {
textPath = (RNSVGTextPath*) targetView;
[textPath getPathLength:&_pathLength
lineCount:&lineCount
lengths:&lengths
lines:&lines
isClosed:&isClosed];
return;
}
}
}