To store the information: // Get the standardUserDefaults object, store your UITableView data array against a key, synchronize the defaul...
Read More
Print Array imageUrl in tableviewCell
NSData *imageData=[[NSData alloc]initWithContentsOfURL:[NSURL URLWithString:[imageArray objectAtIndex:indexpath.row]]]; cell.imageView.ima...
Read More
by clicking return goes to next textfield:
- (BOOL)textFieldShouldReturn:(UITextField *)textField { if ([textField isEqual:txt1]) { [txt2 becomeFirstResponder]; } return true;...
Read More
action sheet title color:
alert.view.tintColor = [UIColor darkGrayColor];
Read More
action sheet
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Alert" message:@"" preferredStyle:UIAlertCon...
Read More
convert image to base64
UIImage *img = [UIImage imageNamed:@"mapping.png"]; NSData *data = UIImagePNGRepresentation(img); NSString * _base64=[[NSString...
Read More
Auto Complete Google Maps:
Appdelegate.m: @import GooglePlaces; @import GoogleMaps; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOption...
Read More
get user current location
#import "CDViewController.h" #import <CoreLocation/CoreLocation.h> @interface CDViewController () @end @implementation C...
Read More
Convert string to date object
NSDateFormatter *dateFormatr = [[NSDateFormatter alloc] init]; [dateFormatr setDateFormat:@"YYYY MM dd"]; NSDate *date = [dateF...
Read More
String Seperated by , :
NSArray *substrings = [myString componentsSeparatedByString:@":"]; NSString *first = [substrings objectAtIndex:0]; NSString *se...
Read More
comparision:
NSComparisonResult result; //has three possible values: NSOrderedSame,NSOrderedDescending, NSOrderedAscending result = [today compare:yo...
Read More
Date Formatter:
NSDate *todayDate = [NSDate date]; NSDateFormatter *dateFormat = [[NSDateFormatter alloc]init]; [dateFormat setDateFormat:@"MMMM-dd-...
Read More
Date Format:
NSDate *today = [NSDate date]; NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@"MMMM dd, yyyy...
Read More
Adding array to another array:
[veharray addObjectsFromArray:numArray];
Read More
compare null array with other array:
if([array count]==0){ }
Read More
Setting cell border style and color:
if(cell=nil) { } CALayer *layer=cell.layer; [layer setCornerRadius:8.0f]; [layer setMasksToBounds:Yes]; [layer setBorderWidth:2.0f]; ...
Read More
set background image for scroll view:
scrollView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"tileableImage.png"]];
Read More
set navigation bar color:
For Color : [[UINavigationBar appearance] setBarTintColor:[UIColor blackColor]]; For Image [[UINavigationBar appearance] setBackgroundIm...
Read More
NSUserDefaults - storing and retrieving data (String)
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:YOUR_VALUE forKey:@"KEY_NAME"]; [defaults...
Read More
All interface orientations must be supported unless the app requires full screen:
1.go to project 2. general 3. deployment info 4. check mark (requires full screen)
Read More
Number is equal to Number:
if([num isEqualToNumber:[NSNumber numberWithInt:13]]){ }
Read More
NSUFNumber error and print NSNumber in label:
NSNumber *amount_value; self.amountLabel.text=[nsstring stringWithFormat:@"%@",amount_value];
Read More
NSComparisonResult
NSComparisonResult compareResult; compareResult = [str1 compare:str2]; if (compareResult == NSOrderedAscending) NSLog(@"str1 prec...
Read More
Subscribe to:
Posts (Atom)