Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

arnieterm

macrumors regular
Original poster
Aug 28, 2008
201
0
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

THanks
Arnieterm
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.