Welcome, Guest
Username Password: Remember me

Image to the left of the title
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Image to the left of the title

Image to the left of the title 1 year, 4 months ago #1

Evening

Is it possible to add an image to the left of the cell title ?

Iain
  • ihmunro
  • OFFLINE
  • Expert Boarder
  • Posts: 135
  • Karma: 0

Re: Image to the left of the title 1 year, 4 months ago #2

Hi Iain,

Sure, just set the cell's imageView.image property. If your cells are automatically generated, then you should do that in the SCTableViewModelDelegate method called willConfigureCell:

 
- (void)tableViewModel:(SCTableViewModel *)tableViewModel
willConfigureCell:(SCTableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
cell.imageView.image = myImage;
}
 


Hope this helps!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: Image to the left of the title 1 year, 4 months ago #3

Hi Tarek

I got the image working and is on the main screen against each of the entries - another question.

Is it possible to have say a directory of icons built into the app whereby the use could determine which Icon they would like next to each category ?

Iain
  • ihmunro
  • OFFLINE
  • Expert Boarder
  • Posts: 135
  • Karma: 0

Re: Image to the left of the title 1 year, 4 months ago #4

Sure, you can always add images to your application by adding them to the Resources folder, and use them later by calling [UIImage imageWithName:]. Please note that this discussion is out of the scope of this forum, and you will find plenty of explanation regarding this in Apple's documentation.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: Image to the left of the title 1 year, 4 months ago #5

Thanks Tarek - I will look into how to do this.
  • ihmunro
  • OFFLINE
  • Expert Boarder
  • Posts: 135
  • Karma: 0
  • Page:
  • 1
Time to create page: 0.83 seconds