acerbetti / ACEDrawingView

An open source iOS component to create a drawing app
Apache License 2.0
665 stars 171 forks source link

Custom Shapes #79

Open devarajidesign opened 7 years ago

devarajidesign commented 7 years ago

Hai,

Can you please explain how to use the custom in that code.Because i tried it forcely closed.I want some shapes like triangle,rectangle..

acerbetti commented 7 years ago

In the current implementation you can only have one ACEDrawingTool.

Create a new NSObject which implement the protocol ACEDrawingTool (see other examples like rectangle).

Now set the new tool to the ACEDrawingTool property and set the drawTool = ACEDrawingToolTypeCustom

you should be able to use your custom tool.

If you want to implement more than one, I would like to suggest to implement new tools and submit a PR