Join Bill Weinman for an in-depth discussion in this video Capturing the touch position, part of Code Clinic: C++.
- Capturing touch position is pretty straightforward in IOS.…Here in viewDidLoad, you notice starting around line 116…I set up a PanGestureRecognizer.…I set the selector to panMethod,…using the UI View Control called interview…and I set the delegate to self,…which is this view controller class.…This is really just a short cut so I don't have…to create a whole new class with lots of properties…and interfaces, just for a few lines of code.…You'll notice in the .h file, here on line 16,…I set this class to recognize the…UIGestureRecognizerDelegate protocol.…
This is an essential piece to make this technique work.…PanMethod is up here starting on line 99.…And this is really very simple, this is the method…that's called when touch events are received.…So when you touch the screen and move your finger around,…this is the method that's called, with those touch events.…The coordinates are converted to the same scale…as the sliders, 40 to 4000 hertz for frequency.…And zero to 100 percent for volume,…then the volume and frequency properties…
Bill introduces challenges and provides an overview of his solutions in C++. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.
Visit other courses in the series to see how to solve the exact same challenges in languages like C#, Java, PHP, Python, and Ruby.
Skill Level Intermediate
Problem One: Exploring Lake Pend Oreille
Solution overview2m 51s
Problem Two: Image Analysis
Problem Three: Eight Queens
Problem Four: Accessing Peripherals
Problem Five: Recursion and Directories
Problem Six: Building the Web
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.