You can either do it with Objectice-C using
classes loke NSString and NSArray
reading a complete file is just
NSString *filesContent = [[NSString alloc] initWithContentsOfFile:@"file.txt"];
then you can split that array e.g at whitespace with something like
NSArray rows = [filesContent componentsSeparatedByString:@"\r\n"];
then you can split the rows at whitespace.
And or you do it the old faschioned C way.
Opening the file with fopen
reading the file line by line
splitting the line e.g. with sscanf
And filling an Array
int arr[9][[9];
Pseudo Code (not tested, just to give you an idea)
char buf [2048];
char *pc;
int arr[9][[9];
int i_rval;
int row[9];
File *fin = fopen("file_with_9_x_9_matrix.txt");
/* error handling */
int i = 0;
while ((pc = fgets(buf, sizeof(buf), fin)) != NULL) {
row = arr[i];
i_rval = sscanf("%d %d %d %d %d....", &row[0], &row[1]);
/* error handling */
i++;
}
Or you can mix something out of Objectice-C and C.