iOS touch
Method:
//Start contact-(void)Touchesbegan:(nsset *) touches withevent:(uievent *) event;-//move on the screen -(void)touchesmoved:(nsset *) touches withevent:(uievent *) event;-//Touch End -(void)touchesended:(nsset *) touches withevent:(uievent *) event;-//Cancel Touch -(void)touchescancelled:(nsset *) touches withevent:(uievent *) event;
Implement the UIView movement
-(void) Touchesbegan: (Nsset *) touches withevent: (Uievent *) event {}-(void) touchesmoved: (Nsset *) touches withevent: (Uievent *) Event {Uitouch *touch = [touches anyobject];//Get Touch Objects Cgpointcurrent = [Touch Locationinview: Self];//Get the point where the current touch is located Cgpointprevious = [Touch Previouslocationinview: Self];//Get the last point where the touch is CgpointCenter = Self. Center;//Get the midpoint of UIViewCenter. x+ = Current. x-Previous. x; Center. Y+ = Current. Y-Previous. Y; Self. Center= center;} -(void) touchesended: (Nsset *) touches withevent: (Uievent *) event {}
UIView example of "iOS Dev-touch" move