February 2012
3 posts
3 tags
Extract Address Book Address Values on iPhone OS →
3 tags
Comparing Dates in Objective-C
NSDate * dateOne = [NSDate date];
NSDate * dateTwo = [NSDate date];
if([dateOne compare:dateTwo] == NSOrderedAscending) {
// dateOne is before dateTwo
}
2 tags
iOS Polygon Hit Test with CGMutablePathRef,... →
- (BOOL) containsPoint: (CGPoint) aPoint
{
// Prepare corner of isometric map (rhombus).
CGPoint points[4];
points[3] = ccp(0.5f * self.tmxMap.contentSize.width, 0);
points[2] = ccp(self.tmxMap.contentSize.width, 0.5f * self.tmxMap.contentSize.height);
points[1] = ccp(0.5f * self.tmxMap.contentSize.width, self.tmxMap.contentSize.height);
points[0] = ccp(0, 0.5f *...