Sunday, February 26, 2012

Batch Conversion PNG to JPEG or JPEG to PNG OS X

Open Terminal, cd to the directory containing your JPGs images and type:
JPEG To PNG

mkdir pngs; sips -s format png *.* --out pngs

Open Terminal, cd to the directory containing your PNGs images and type:
PNG To JPEG

mkdir jpegs; sips -s format jpeg *.* --out jpegs

Sunday, February 5, 2012

AR (Augmented reality), QR code and OCR reader library reference for iOS

Library reference for AR(Augmented Reality)
1. Qualcomm Dev Net
    Click here

Library reference for QR
1. Zxing for iOS
    GitHub Link Here

Library reference for OCR
1. ABBY'S SDK for iOS
    Click here



Thursday, February 2, 2012

Sort NSArray - iPhone SDK


Sort array of NSNumber


NSSortDescriptor *highestToLowest = [NSSortDescriptor sortDescriptorWithKey:@"self" ascending:NO];
[mutableArrayOfNumbers sortUsingDescriptors:[NSArray arrayWithObject:highestToLowest]];


Sort array of NSDictionary


NSSortDescriptor *descriptor = [[[NSSortDescriptor alloc] initWithKey:@"product_name" ascending:YES] autorelease];
NSArray *descriptors = [NSArray arrayWithObjects:descriptor, nil];

NSArray *realArray = [arrayObject sortedArrayUsingDescriptors:descriptors];