Open Source iOS Library For Adding Basic Touch Handling To A UIView Instantly

There are some things that you just find yourself doing all the time, and one of those things is adding touch handling to a UIView component.

If you’ve done this before then you’ve probably created a solution for doing this, but if you don’t have one – or you are looking for something a little more elegant this open source library coudl be the ticket.

This library extends the UIView class adding handling for touch up, touch down, double taps, and two finger taps – all with a very clean syntax utilizing blocks.

You simply need to use code like this:

[myView whenTapped:^{ NSLog(@”I was tapped!”); }];

To add touch handling to a UIView.

The library is from Jake Marsh and you can find it on Github here:
https://github.com/jakemarsh/JMWhenTapped

A very clean and easy way for adding basic touch handling to a UIView.

©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.

.

DeliciousTwitterTechnoratiFacebookLinkedInEmail


Leave a Reply

Your email address will not be published. Required fields are marked *