1 //Start Touching2- (void) Touchesbegan: (Nsset *) touches withevent: (Uievent *)Event3 {4NSLog (@"you touch the screen.");5 }6 //Moving7- (void) touchesmoved: (Nsset *) touches withevent: (Uievent *)Event8 {9NSLog (@"Finger Movement");Ten } One //Touch End A- (void) touchesended: (Nsset *) touches withevent: (Uievent *)Event - { -NSLog (@"Touch End"); the } - //Interrupt Touch -- (void) touchescancelled: (Nsset *) touches withevent: (Uievent *)Event - { +NSLog (@"Interrupt Touch"); - } + //start shaking your phone A- (void) Motionbegan: (uieventsubtype) Motion withevent: (Uievent *)Event at { -NSLog (@"Start Shaking"); - } - //The shaking was interrupted -- (void) motioncancelled: (uieventsubtype) Motion withevent: (Uievent *)Event - { inNSLog (@"Interrupt Shaking"); - } to //Shaking End +- (void) motionended: (uieventsubtype) Motion withevent: (Uievent *)Event - { theNSLog (@"Shaking End"); *}
To create a new controller, you can respond to some basic events by adding the basic methods above.
iOS events (touch, move, shake)