How to read formatted string from a text file?

ok so this is how I did it … I just used the fact that ObjC is a superset of C char personName[256]; char imgFilename[512]; int personNumber; NSArray *array = [outputString componentsSeparatedByString:@”\n”]; int lines = [array count]; FILE *file = fopen([filePath UTF8String],”r”); for (int i = 0; i<lines; i++) { fscanf(file,”%d %s %s”,&personNumber, personName, imgFilename); … Read more

iphone 5 showing empty space at bottom [duplicate]

Use this code it will help you, here we have to create two xib file for using this code like (viewcontroller.xib and viewcontroller_5.xib),when you use the application in iphone4 call iphone4 screen else call iphone5 screen. Thanks. if([[UIScreen mainScreen] bounds].size.height == 568){ self.viewController = [[[ViewController alloc] initWithNibName:@”ViewController_5″ bundle:nil] autorelease]; NSLog(@”iphone5″); }else { self.viewController = [[[ViewController … Read more