This simple code will display an image on the left side of cell using Objective-C.
First create a string that contains source information of image file like “Image Name” and “Image Type”. Then create an Image using this String. Then upload the image to the cell.
NSString *imageSource = [[NSBundle mainBundle] pathForResource:@"icon" ofType:@"jpg"];
UIImage *image = [UIImage imageWithContentsOfFile: imageSource];
cell.image = image;
Note : The icon.jpg should be in your “Resources” folder.
Tuesday, November 4, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment