//————————————————————— AppDelegate.h UIBackgroundTaskIdentifier bgTask; //————————————————————— AppDelegate.m –...
How to create file and read/write Data in iphone/ipad
//Documents Directory Path NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; //Give file Name With Extention to create NSString *savedImagePath = [documentsDirectory stringByAppendingPathComponent:@”FileName.docx”]; [[NSFileManager defaultManager] createFileAtPath:savedImagePath...
Function For returning Multiple values in iphone
Function For returning Multiple values in iphone – (void)viewDidLoad { [super viewDidLoad]; //Return In Dictionary NSDictionary *FullName = [Self FullnameDict:@”AAAA,BBBB”]; NSString *FName = [Name objectForKey:@”firstame”]; NSString *LName = [Name objectForKey:@”lastname”]; //Return In Array NSArray *FullName1 = [Self...
Lazy Loading UITableView Cell images in iPhone
.h – (void) loadImageInBackground:(NSArray *)urlAndTagReference ; – (void) assignImageToImageView:(UIImage *)img; .m – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0];...
How To Update ProgressBar in iPhone
//——————— .h File { NSTimer *timer; UIProgressView *myProgressBar; int StartingValue; } @property (nonatomic, retain) UIProgressView *myProgressBar; //———— .m File @synthesize myProgressBar; – (void)viewDidLoad { StartingValue = 0; myProgressBar = [[UIProgressView alloc] init]; myProgressBar.frame = CGRectMake(25, 100, 235...
How to get Latitude,Longitude of two cities and Calculate Distance in iphone
import Framework CoreLocation.framework MapKit.framework //———————————————————————— #import “ViewController.h” #import <MapKit/MapKit.h> NSMutableArray *citynamearray; NSMutableArray *latarray,*longarray; ...