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…

How to create a circular dotted line as a CALayer?

ViewController.h file @interface ViewController () @property (nonatomic,strong) IBOutlet UIImageView *origImage; @end ViewController.m file @implementation ViewController { } @synthesize origImage; – (void)viewDidLoad { [super viewDidLoad]; // “CAShapeLayer” The path defining the shape to be rendered // UIBezierPath using to create a circular path CAShapeLayer *circleLayer = [CAShapeLayer layer]; [circleLayer setPath:[[UIBezierPath bezierPathWithOvalInRect: CGRectMake(50, 50, 100, 100)] CGPath]];…

Padding the textfields

Most of the programmer knows the basic concepts of Objective c. But the “Happy Coding” going to do they describe about “what is the scenario achieved By “Happy Coding” in the platform. That have posted here. Any Clarification on that, Kindly Comment it. Add Padding in the textfields. Use “Category” file  to achieve the padding…