i want to draw line, i have two textfiled in which i enter some value and when i click the button, the line will draw(1cm for each textfiled value)…
suppose i enter some value on line 1 textfiled, the line will draw 1cm and when i enter value 5 the line will draw 5cm…
same as textfiled 2…
when the line of first textfield end , the second textfiled line will start at the end of first textfield line…
Means lastpoint of line 1 is a starting point of line two…
Totally i have two textField and 1 button.
I have no idea how to do this? Can anyone help me?
You will need to subclass a
UIView(MYDrawingView)Add the parameter for drawing as properties of this
MYDrawingViewThen implement
drawRectfunction ofUIViewinMYDrawingView, after that you can use thedrawRectto draw lines and/or other shapes