Category Archives: iphone

iOS touchesEnded for multitouch single finger release

If you need to know which finger actually were lifted from screen when doing a multiple touch tracking, you need to check the phase variable from UITouch to see if it has been actually lifted from screen. If the single touch has ended, it’s phase will be UITouchPhaseEnded

Normally when you lift one finger, the touchesEnded is called with a set of all active touches. I wish it would be a set of only touches that have ended.

Example code:

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
{
NSSet *allTouches = [event allTouches];

for (int zz=0;zz<[allTouches count];zz++) { UITouch *touch = [[allTouches allObjects] objectAtIndex:zz]; CGPoint touchPos = [touch locationInView:self]; if (touch.phase==UITouchPhaseEnded) {

How to remove the gloss / glare / white area from iPhone app icon?

To remove the gloss / glare / white area from iPhone app icon that iPhone adds automatically – go to the Xcode and open up the App’s Info.plist. On right side you see list like button. Press that and you’ll get new row with selectable property name. From there pick the “Icon already includes gloss..” and check the checkbox.

So in short: it’s a property in the App info.plist.

Working MD5 for Objective-C

  1.  
  2.  
  3. #import <CommonCrypto/CommonDigest.h>
  4. "%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",
  5. result[0], result[1],
  6. result[2], result[3],
  7. result[4], result[5],
  8. result[6], result[7],
  9. result[8], result[9],
  10. result[10], result[11],
  11. result[12], result[13],
  12. result[14], result[15]];
  13.  
  14. }
  15.  
  16.