Merge pull request #20 from deathbaba/superLastFix

[iOS]handle all kinds of urls on iPad
This commit is contained in:
deathbaba 2013-08-13 13:23:49 -07:00
commit 660946443f

View file

@ -229,7 +229,14 @@ shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherG
if (r.location + 4 >= [url length])
return;
if (r.length && [[url substringWithRange:NSRange{r.location + 1, 4}] isEqualToString:@"html"])
[[self getArticleController] updateView:[url substringToIndex:r.location]];
{
NSString * htmlId = [url substringToIndex:r.location];
NSRange z = [htmlId rangeOfString:@"/" options:NSBackwardsSearch];
if (r.length)
[[self getArticleController] updateView:[htmlId substringFromIndex:z.location + 1]];
else
[[self getArticleController] updateView:[htmlId substringToIndex:z.location]];
}
}
}