Bronze Challenge: Clearing Lines

Right now, the TouchDrawView clears its lines whenever the user double taps. Keep this same functionality but have a gesture recognizer perform the recognition of the double tap instead of touchesBegan:withEvent:. Make sure you remove the following code from touchesBegan:withEvent:.

i​f​ ​(​[​t​ ​t​a​p​C​o​u​n​t​]​ ​>​ ​1​)​ ​{​
 ​ ​ ​ ​[​s​e​l​f​ ​c​l​e​a​r​A​l​l​]​;​
 ​ ​ ​ ​r​e​t​u​r​n​;​
}​

Get iOS Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.