[ios] Fixed crash for some html bookmarks description

This commit is contained in:
Alex Zolotarev 2014-10-30 16:19:03 +03:00 committed by Alex Zolotarev
parent b027839e3f
commit 390e220b58

View file

@ -64,7 +64,12 @@
+ (CGFloat)cellHeightWithWebViewHeight:(CGFloat)webViewHeight
{
return webViewHeight - 5;
// @HACK This code should be rewritten. It is a release-hot-fix.
// Sometimes webViewHeight is too low for some html descriptions (should be investigated deeply)
CGFloat const h = webViewHeight - 5;
if (h < 0)
return 0;
return h;
}
+ (CGFloat)cellHeightWithTextValue:(NSString *)text viewWidth:(CGFloat)viewWidth