Drawing lines between windows, as in the Builder interface

I have two windows, each of which has a round NSView:

------------------     ------------
|X-+ Oscillator  |     |X-+ Mixer |
|----------------|     |----------|
|                |     |          |
|        O       |     |     O    |
|                |     |          |
|                |     |          |
------------------     ------------

Both windows are in a separate NIB. I want to be able to draw a line between two rounds NSViewat runtime using drag'n'drop, just like connecting IBOutlets in Interface Builder:

------------------     ------------
|X-+ Oscillator  |     |X-+ Mixer |
|----------------|     |----------|
|                |     |          |
|        O-------+-----+-----O    |
|                |     |          |
|                |     |          |
------------------     ------------

I also want to be able to determine which one is NSViewconnected NSViewusing the drawn lines. I need this to connect the oscillators to the mixers. I also want to delete the deleted connections by dragging them to the empty space.

Can someone explain to me how to do this? Thank.

+3
2

, , ( , ). . .

( ), . , , / /. , (, ), .

+2

, , : . , (, , - , !) single, .

, - , . , ( ) . , . , ( Builder - - Quartz Composer), - . , , , .

. Core Animation .

0

Source: https://habr.com/ru/post/1749799/


All Articles