Featured
-
Objective C or Swift - Which Technology to Learn for iOS Development?
Swift programming language is completely based on
by siddharth.sindhi -
Make UIImage White Background Transparent in iOS
If you came across to a requirement where you want
by ashish.nakoti -
User's location update on server when app is in background.
Code for those Apps where we need to update user's
by ashish.nakoti -
Animate button with zoom and bounce effect in ios
Many social apps are using bouncing effect for but
by ashish.nakoti -
Crop an image from UIImageView
With the following method stated below you can cro
by kuldeep.butola
Tags
How to convert from NSSTRING TO NSDATE ?
// date from string
NSString *dateString = [NSString stringWithFormat:@"%@",_model.time]; // model.time is the field in which we are fetching the string.
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFo...
test if an NSString is empty in Objective C
You can check if( [empName length]==0 || [[empName stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0) this will return 1 else 0
NSString *empName;
if ([empName length]==0 || [[empName stringByTrimmingCharac...
Check a string with special characters in ios
If you want to check any NSString containing special characters then check this out.
-(BOOL)specialCharacter:(NSString*)username{
NSCharacterSet *invalidCharSet = [[NSCharacterSet characterSetWithCharactersInString:@"ABCDEFGHIJKLMNOPQRSTU...
How to convert NSData to NSString or vice versa in Objective C and Swift
Hi Readers!
In this blog you can find both versions (Obj C & Swift) for converting NSData to NSString or vice-versa.
Objective C
NSString * str = @"Hello";
NSData * data =[str dataUsingEncoding:NSUTF8StringEncoding];
NSLog(@"Data = ...
When to use copy Attribute in declaring a property in objective c
We all use attributes in Objective C to declare properties. Attributes commonly used are strong, nonatomic, weak, assign. But we never take it seriously why we are using these attributes.
One of the common mistakes I often see is the wrong us...