MotionEnded is not called continuously
There is a list of videos in main view. In that main view, i have added a UIWebView as subview to play videos.
I suppose to do, when i shake iPhone it should play the next video in UIWebView.
It is working fine for the very first time but as come back to main view and again try to perform the same th开发者_C百科ing, it is not reacting.
Any solution please?
Make sure when the view (re)appears that you set it as the first responder.
-(void)viewDidAppear:(BOOL)animated
{
[self becomeFirstResponder];
}
It needs to be in viewDidAppear and not viewWillAppear
精彩评论