My code right now is
Both NSLogs are not appearing in the debugger, so the device isn't getting this method sent to it.
I thought i did everything right but the device still wont recognize the shake...any idea what I'm missing or doing wrong?
Code:
-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self becomeFirstResponder];
}
-(void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
if (motion == UIEventSubtypeMotionShake)
{
[self.theList removeAllObjects];
NSLog (@"You shook the device. New List Count %d",self.theList.count);
}
}
-(void)motionEnded:(UIEventSubtype)motion withEvent(UIEvent *)event
{
NSLog(@"Device finished shaking");
}
Both NSLogs are not appearing in the debugger, so the device isn't getting this method sent to it.
I thought i did everything right but the device still wont recognize the shake...any idea what I'm missing or doing wrong?