November 2013
Intermediate to advanced
576 pages
19h 3m
English
A basic gesture recognizer is simple to set up. Typically, a gesture recognizer would be set up in a view controller where there is visibility to the view of interest, and a logical place to put a method that can accomplish what is wanted. All that needs to be determined is what view the tap recognizer should belong to, and what method should be called when the recognizer has succeeded.
UITapGestureRecognizer *tapRecognizer =[[UITapGestureRecognizer alloc] initWithTarget:selfaction:@selector(myGestureViewTapped:)];[myGestureView addGestureRecognizer:tapRecognizer];[tapRecognizer release];
Some gesture recognizers will accept more parameters to refine how they act, but for the most ...
Read now
Unlock full access