How to set different iphone pattern brushes

I set the brush drawing using CGContext and Bezierpath in UIImageView.

Is this a good approach?

Do we have any other recommendations for setting the brush pattern to create another brush pattern.

Does anyone have another design template that I can use when implementing my brush?

+7
iphone
source share
2 answers

Yes, thatโ€™s fine if thatโ€™s what you want to do. Every โ€œbrushโ€ means in this context how you want to stroke the line. If you are just trying to set the stroke pattern for the bezier path on some UIImageView, then yes, it seems that what you are doing is appropriate.

Now, depending on your ultimate goal, there may be different ways to approach it. Your method may have difficulty interacting with a higher-level drawing in UIKit. Since you asked about this 7 months ago, I hope you already understood this.

+2
source share

If you use bezierpath you can use patternImage code in bezierpath. If you use CGContext, adjust the line width and use the kcglinecap methods to get different points.

In bezierpath, you can also use dashpattern to draw hatching lines.

-one
source share

All Articles