developer

library not found for -lPods

Question: ❓❓❓ I got an error when archiving a project. This is my environment. Mac OS Lion Xcode 4.3.1 iOS SDK 5.1 The project deployment target is: IPHONEOS_DEPLOYMENT_TARGET 3.2 The error shows: ld: library not found for -lPods clang: error: linker command failed with exit code 1 (use -v to Read more…

By admin, ago
developer

UILongPressGestureRecognizer gets called twice when pressing down

Question: ❓❓❓ I am detecting if the user has pressed down for 2 seconds: UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)]; longPress.minimumPressDuration = 2.0; [self addGestureRecognizer:longPress]; [longPress release]; This is how I handle the long press: -(void)handleLongPress:(UILongPressGestureRecognizer*)recognizer{ NSLog(@"double oo"); } The text “double oo” gets printed twice when I press Read more…

By admin, ago
developer

How do I draw a shadow under a UIView?

Question: ❓❓❓ I’m trying to draw a shadow under the bottom edge of a UIView in Cocoa Touch. I understand that I should use CGContextSetShadow() to draw the shadow, but the Quartz 2D programming guide is a little vague: Save the graphics state. Call the function CGContextSetShadow, passing the appropriate Read more…

By admin, ago
developer

Determine device (iPhone, iPod Touch) with iPhone SDK

Question: ❓❓❓ Is there a way to determine the device running an application. I want to distinguish between iPhone and iPod Touch, if possible. Good Answer: 👌👌👌 You can use the UIDevice class like this: NSString *deviceType = [UIDevice currentDevice].model; if([deviceType isEqualToString:@"iPhone"]) // it's an iPhone Read More: 👉 https://stackoverflow.com/questions/448162/determine-device-iphone-ipod-touch-with-iphone-sdk

By admin, ago