Connects the anchor points of two layers with a line. With the "Variant" option you can control, how exactly the two points should be connected - there exist many variants, from a straight line to a combination or horizontal and vertical lines with rounded corners.
If you want to draw a curve though more than just two points, take a look at the Connect Multiple Layers iExpression.
- Make sure the anchor points of the two layers are located where the line should start/end, respectively.
- Connect the two layers in the expression parameters
- Create a new path (on a new shape layer) and apply the expression to the path
- You can lock the shape layer now. When you move the two layers it is connected to, the line updates automatically