Sort mutable array containing dictionary

NSComparator compareDistances = ^(id string1, id string2) { NSNumber *number1 = [NSNumber numberWithFloat:[string1 floatValue]]; NSNumber *number2 = [NSNumber numberWithFloat:[string2 floatValue]];…

iOS 8 APNS Token registration method changed

– (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { //– Set Notification if ([application respondsToSelector:@selector(isRegisteredForRemoteNotifications)]) { // iOS 8 Notifications [application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound |…

Convert Haxstring to RGB color

-(UIColor*)colorWithHexString:(NSString*)hexaColor { NSString *cString = [[hexaColor stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] uppercaseString]; if([cString length] < 6) return [UIColor grayColor]; if([cString hasPrefix:@”0X”]) cString =…