about 9 years ago
To provide some action on touch of any view ,UITapGestureRecognizer is used. Write this code in viewDidLoad
- (void)viewDidLoad { [super viewDidLoad]; myView.userInteractionEnabled = YES; UITapGestureRecognizer *singleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTap:)]; [myView addGestureRecognizer:singleFingerTap]; //myView is that view for whom we want to set any action [singleFingerTap release]; //The event handling method - (void)handleSingleTap:(UITapGestureRecognizer *)recognizer { CGPoint location = [recognizer locationInView:[recognizer.view superview]]; //set any action you want to perform on touch event }
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)