Drawing connector lines dynamically

Discussion in 'iOS Programming' started by arnieterm, Nov 20, 2009.

  1. macrumors regular

    Aug 28, 2008
    Hi all
    In my iphone application, I have to implement a feature as given below:
    When user taps a point on the screen and start dragging then I have to show a line that is starting from the initial point of tap and will continue upto where the user releases the finger.
    The line should continuously track the finger movement. At first sight it seems to be a drawing app but no it is a connector kind of application. By connector I mean to say the feature in Interface Builder when we bind a Referencing Outlet to a UIView element than a blue line appears temporarily upto the time when user keeps pressing the mouse button and the line disappears when the mouse button is released.
    Using CoreGraphics, I think we can draw the line but how can I erase the previous drawn line

  2. Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    As a matter of fact, there is an example of a program that does this in Chapter 12 of "Beginning iPhone 3 Development" by Dave Mark and Jeff LaMarche.

Share This Page