I have a jpg image called Check Mark.jpg that I am trying to load into the accessory view of a table cell. This is my code now:
cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Check Mark.jpg"]];
in cellForRowAtIndexPath method
When I do this, nothing is displayed in the table view cell. I checked the file name and tried to put it in the folder containing the .xcodeproj file and the folder containing all the code files. None of them worked. I also tried to declare UIImageView and UIImage as strong properties and initialize them in the init: method. None of this is happening. I can display the disclosure button in the view, so I know there is an accessory view, but I canβt figure out how to display this simple image.
Do I have to somehow upload the image to my project?
source share