2

In my iOS Application i have to match the elements like below image , How to draw the line between selected views. What kind of guesstures i have to use. Thanks in advance.

enter image description here

let line_path:CGMutablePath = CGMutablePath()
line_path.move(to: CGPoint(x:x1, y:y1))
line_path.addLine(to: CGPoint(x:x2, y:y2))
Mahesh Narla
  • 342
  • 2
  • 3
  • 20
  • What you have tried so far – pkc456 Dec 26 '16 at 07:58
  • Are you planning on adding the ability to drag from one image to another to draw the line? Or simply draw the line if button tapped on the left column matches with the button tapped on the right column? – Rikh Dec 26 '16 at 09:19
  • 1
    @pkc456 I am using textview and buttons. Here textview contains ocr resultant text and buttons are name, address... So I want to match them to identify them in easy way by drag from one textview to another button to draw the line. – Mahesh Narla Dec 26 '16 at 09:21
  • 2
    How can I draw path between textview and a button in swift –  Dec 26 '16 at 11:17
  • 1
    I think this link will help u. [enter link description here](http://stackoverflow.com/questions/31569051/how-to-draw-a-line-in-the-simplest-way-in-swift) –  Dec 26 '16 at 12:11
  • @SujathaGirijala Have you tried that link? – Mahesh Narla Dec 26 '16 at 12:16
  • yes. Its working for straight lines not for curved –  Dec 26 '16 at 12:18
  • Will you able to draw line between two components by draging? If yes kindly update your answer here so that i can verify – Mahesh Narla Dec 26 '16 at 12:20

0 Answers0