You can resize the UIBezierpath relative to your UITextview frame size as follows:
CGRect box = CGPathGetBoundingBox(bezierpath.CGPath) CGFloat scaleX = textView.frame.size.width / box.frame.size.width; CGFloat scaleY = textView.frame.size.height / box.frame.size.height; CGAffineTransform transform = CGAffineTransformMakeScale(scaleX, scaleY); CGPathRef intermediatePath = CGPathCreateCopyByTransformingPath(bezierpath.CGPath, &transform); bezierPath.CGPath = intermediatePath; CFRelease(intermediatePath);
Hope that helps!
Asif mujteba
source share