I've got a custom cell with a UILabel and UIImageView which is only partly working.
The storyboard is connected to each of the outlets and all that... no problems there. In the view controller the label is being populated with the text fine... but for whatever reason, the image is not showing up.
CustomCell.h
@property (strong, nonatomic) IBOutlet UILabel *lblMenuItem;
@property (strong, nonatomic) IBOutlet UIImageView *imgMenuItem;
MainViewController.m
CustomCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
cell.lblMenuItem.text = menuTitleArrat[indexPath.row];
cell.imgMenuItem.image = [UIImage imageNamed:imageMenuArr[indexPath.row]];
The text is showing up in the label for the custom cell, but the image... nothing. No warnings, just nothing showing up.
Now, if I add the image like so:
cell.imageView.image = [UIImage imageNamed:imageMenuArr[indexPath.row]];
That works, but the positioning is off from how it's set in the storyboard the way I'd like.
Thoughts / comments? Seems like this shouldn't be that difficult...
EDIT: Good points, but unfortunately not that either.
Here's the setup in the storyboard:
And then it running in the simulator: