User : espinallab
|How to find the distance between two CG points?||espinallab||Objective C||CGPoint||
Distance between p1 and p2:
CGFloat xDist = (p2.x - p1.x); CGFloat yDist = (p2.y - p1.y); CGFloat distance = sqrt((xDist * xDist) + (yDist * yDist));
Background: Pythagorean theorem
Edit: if you only need to calculate if the distance between the points increases or decreases, you can omit the sqrt() which will make it a little faster.
|May 25, 2011|
|Playing and Stopping Sound Effect in Cocos2d||espinallab||Objective C||SimpleAudioEngine||
This is how you play and stop sound effects in cocos2d
|May 24, 2011|
|Display a UIPopoverController||espinallab||Objective C||May 10, 2011|
|Porting Over iPad game to iphone the easy way cocos2d.||espinallab||Objective C||May 7, 2011|
|Cocos2d Scrolling Background||espinallab||Objective C||April 26, 2011|
|Check if the user is using an iPhone, iPod Touch device||espinallab||Objective C||UIUserInterfaceIdiomPhone||April 14, 2011|
|Reading plist file into an NSDictionary||espinallab||Objective C||April 14, 2011|
|Universal Getters - App||espinallab||Objective C||April 14, 2011|
|Easy way for Checking Device Type||espinallab||Objective C||April 14, 2011|
|Loading ViewController with CoreAnimation||espinallab||Objective C||April 14, 2011|
|Determine device (iPhone, iPod Touch) with iPhone SDK||espinallab||Objective C||touch||
Here is how to determine the device type.\r\n\r\nHow to use it.\r\n\r\nUIDeviceHardware *h=[[UIDeviceHardware alloc] init];\r\n[self setDeviceModel:[h platformString]]; \r\n[h release];
|August 7, 2010|
|Add white shadow to the text iPhone||espinallab||Objective C||UILabel||
Here is how you add a shadow to a UILabel on the iPhone.
|May 22, 2010|
|Adding entry to AddressBook iPhone||espinallab||Objective C||ABAddressBookCreate||
Add the following framework "AddressBook.framework" to your project
Make sure to import these header files.import "AddressBook/ABAddressBook.h" import "AddressBook/ABPerson.h" import "AddressBook/ABMultiValue.h"
|May 6, 2010|
|UIActionSheet cancel button strange behaviour||espinallab||Objective C||UIActionSheet||
01-Dec-2008 10:22 PM Tom Saxton: I looked at this bug some more, and it seems to be an issue with the tabbar.
|May 5, 2010|
|Adding a Search Bar to a UITableView||espinallab||Objective C||UISearchBar||
This might look complicated but actually it was easy than what I though to integrate. I'm using it with Core Data, but I'm sure you can use it with any data type.
|April 30, 2010|