Wednesday, 28 December 2011

Sort NSMutableArray according to Key



<array>
   <dict>
       name =  "zain"
   <dict/>
   <dict>
       name =  "fahad"
   <dict/>
   <dict>
   name =  "Aslam"
   <dict/>
    <dict>
   name =  "kashif"
   <dict/>
<array/>





-(NSMutableArray *)sortArrayAccordingTokey:(NSMutableArray *)array
{
    NSSortDescriptor *sortDescriptor;
    sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES] autorelease];
    NSArray *sortDescriptors = [NSArray arrayWithObject:sortDescriptor];
    NSArray *sortedArray = [array sortedArrayUsingDescriptors:sortDescriptors];
    [array removeAllObjects];
    [array addObjectsFromArray:sortedArray];
    return array;
}

Saturday, 24 December 2011

iPhone Web Services - PHP


iPhone Web Services - IPhone to php to SQL  (Watch all parts)

http://www.youtube.com/watch?v=IQcLngIDf9k&feature=related

 

iPhone Web Services - JSON   (Watch all Parts)

http://www.youtube.com/watch?v=zU8RAeWO2NE&feature=related

Monday, 19 December 2011

Convert NSString into NSDate and Compare two NSDates



NSDateFormatter* formatter = [[[NSDateFormatter alloc] init] autorelease];
[formatter setDateFormat:@"yyyy-MM-dd"];

 NSDate *date1 = [formatter dateFromString:@"2011-12-19"];
 NSDate *date2 = [formatter dateFromString:@"2011-12-15"];

NSComparisonResult result;
result = [date1 compare:date2];

if (result==NSOrderedAscending) {

NSLog(@"date2 is in the future");

} else if (result==NSOrderedDescending) {

NSLog(@"date2 is in the past");

} else {

NSLog(@"Both dates are the same");
}

Install Multiple Xcode versions


Message Errror:
"Scanning for plug-ins failed - You may not have appropriate permission to read or load installed plug-ins"

Solutions and Guide How to Install Multiple Versions:

http://useyourloaf.com/blog/2010/9/7/installing-multiple-xcode-versions.html

Tuesday, 22 November 2011

Tuesday, 15 November 2011

iPhone apps should include an armv6 architecture (issue)


Issue is resolve here:

http://stackoverflow.com/questions/4198676/warning-iphone-apps-should-include-an-armv6-architecture-even-with-build-config

Thursday, 10 November 2011

iOS 5 SDK Tutorial And Ebook


iOS 5 SDK Tutorial And Guide Page:

http://maniacdev.com/ios-5-sdk-tutorial-and-guide/

http://osx.hyperjeff.net/Reference/CocoaArticles?cat=60

Ebook:

http://www.ebooks.ac/ebooks/ios-5-programming-cookbook-pdf/#more-1431

Thursday, 3 November 2011

Paypal Integration in iPhone, android and Blackberry


Video:
http://www.ampev1.com/ondemands/Paypal/080510_PayPal/iphone_v10.htm

SDK:
https://www.x.com/developers/paypal/products/mobile-payment-libraries