I'm writing an app building elements consisting of CGPoints. I have 2 buttons:
makeRectangle and makeTriangle. For building/drawing stage I use three methods for rectangle and three methods for triangle inside drawRect.I'm stuck with my code in
drawRect. In if-else-statement each method swaps the building/drawing scheme for previous element every time a button pressed.If I already have built rectangle and then I click
makeTriangle button, I get new triangle but my rectangle turns into triangle with one unconnected point.Is there a workaround or I shouldn't use
drawRect method?Here's a code and all the details:
http://stackoverflow.com/questions/39855349/make-2-contradictory-methods-work-in-drawrect