Show the upper case letter

NSString *string = @”How many Captial are in Sentence”; NSMutableArray *getCount = [[NSMutableArray alloc]init]; for(int j = 0;j<string.length;j++){ int asciiCode = [string characterAtIndex:j]; if(asciiCode >= 65 && asciiCode <90){ [getCount addObject: [NSString stringWithFormat:@”%c”, asciiCode]]; } NSLog(@”ASCII Value: %d”,asciiCode); } NSLog(@”getCount:%d”,[getCount count]);

Backward Search in Objective-c

NSString *string = @”Here is an example string HELLO “; NSRange rangeToSearch = NSMakeRange(0, [string length] – 1); // get a range without the space character NSRange rangeOfSecondToLastSpace = [string rangeOfString:@” ” options:NSBackwardsSearch range:rangeToSearch]; NSString *spaceReplacement = @” text that i want “; NSString *result = [string stringByReplacingCharactersInRange:rangeOfSecondToLastSpace withString:spaceReplacement];

Share Video/ image / text through an iOS app in whatsapp

We provide several ways in which your iPhone application can interact with WhatsApp: through custom URL schemes, share extension and through the Document Interaction API. Video : NEXT LINE OF CODE IS OPTIONAL AND NOT RECOMMENDED, BUT YOU CAN USE IT TO TEST TO SEE IF THEY HAVE THE WHATSAPP INSTALLED if ([[UIApplication sharedApplication] canOpenURL:…

Create Interactive local notification and simple notification.

1. Create NSObject file to implement the notification functions. 2. Register the notification based on the resolutions.(iOS 7 /iOS 8 and above) 3. Separate the notification (interactive /local). 4. Cancel the notification 5. Cancel the particular notifications. 6. Handle the notification when receiving. Create NSObject file. File named as “Notification”. // Notification.h file #import <Foundation/Foundation.h>…

Get the Max date from the Array using KVC (Key-value coding)

Key-value coding is a mechanism for accessing an object’s properties indirectly, using strings to identify properties, rather than through invocation of an accessor method or accessing them directly through instance variables. In essence, key-value coding defines the patterns and method signatures that your application’s accessor methods implement. Get the Max date from the Array using…