Not having a good day today - still trying to learn obj - c and this is my 2nd stupid problem in one day
Im using the following code to load the filename of an image from a database into a UIImage - and from that show it in a UIImage View
In the debugger im getting the following;
2010-11-05 02:41:26.310 Field and Track[94325:207] Trying to read image from /Users/alan/Library/Application Support/iPhone Simulator/4.2/Applications/2A8DFD5D-BC25-437E-A2B2-850BBA53D1C0/Documents/India.JPG
2010-11-05 02:41:26.313 Field and Track[94325:207] Image filepath India.JPG
2010-11-05 02:41:26.314 Field and Track[94325:207] Logo done
and having checked the filepath - the link is right to the image (when running in simulator at least)
The UIImaveView is linked up correctly, and @synthesized but for some reason when i run the code, i get no errors but the image does not display in the ImageView
Thanks in advance
Alan
Im using the following code to load the filename of an image from a database into a UIImage - and from that show it in a UIImage View
Code:
NSArray *documentPaths2 = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDir2 = [documentPaths2 objectAtIndex:0];
NSLog(@"Trying to read image from %@",[documentsDir2 stringByAppendingPathComponent:[NSString stringWithFormat:@"%s",sqlite3_column_text(compiledStatement, 2)]]);
UIImage *logoImage = [UIImage imageNamed:[documentsDir2 stringByAppendingPathComponent:[NSString stringWithFormat:@"%s",sqlite3_column_text(compiledStatement, 2)]]];
NSLog(@"Image filepath %@",[NSString stringWithFormat:@"%s",sqlite3_column_text(compiledStatement, 2)]);
theImageEditView.image = logoImage;
[logoImage release];
In the debugger im getting the following;
2010-11-05 02:41:26.310 Field and Track[94325:207] Trying to read image from /Users/alan/Library/Application Support/iPhone Simulator/4.2/Applications/2A8DFD5D-BC25-437E-A2B2-850BBA53D1C0/Documents/India.JPG
2010-11-05 02:41:26.313 Field and Track[94325:207] Image filepath India.JPG
2010-11-05 02:41:26.314 Field and Track[94325:207] Logo done
and having checked the filepath - the link is right to the image (when running in simulator at least)
The UIImaveView is linked up correctly, and @synthesized but for some reason when i run the code, i get no errors but the image does not display in the ImageView
Thanks in advance
Alan