Right now I have this-
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
if (event.type == UIEventSubtypeMotionShake) {
int text = rand() % 12;
switch (text) {
case 0:
textview.text = @"blah." ;
break;
For some reason, the text has to be selected for it to work. If you just shake it, nothing will happen.