Fix crash

This commit is contained in:
Ali
2022-05-27 20:00:45 +04:00
parent 9a1799d616
commit 674ffd7cc3
2 changed files with 6 additions and 4 deletions

View File

@@ -19,12 +19,14 @@
- (CGRect)lineFragmentRectForProposedRect:(CGRect)proposedRect atIndex:(NSUInteger)characterIndex writingDirection:(NSWritingDirection)baseWritingDirection remainingRect:(nullable CGRect *)remainingRect {
CGRect result = [super lineFragmentRectForProposedRect:proposedRect atIndex:characterIndex writingDirection:baseWritingDirection remainingRect:remainingRect];
/*if (result.origin.y < 10.0f) {
result.size.width -= 20.0f;
#if DEBUG
if (result.origin.y < 10.0f) {
result.size.width -= 21.0f;
if (result.size.width < 0.0f) {
result.size.width = 0.0f;
}
}*/
}
#endif
return result;
}