iphone - Cannot get UIImage to show in a UICollectionViewCell -


i'm unable set image in uicollectionviewcell, uilabel however, works fine. here's relevant code:

// catagoryviewcell.m #import "catagoryviewcell.h"  @implementation catagoryviewcell @synthesize namelabel;  - (void)setimage:(uiimage *)image {     [catagorycellimage setimage:image]; }  @end  // viewcontroller.m uiimage *image = [uiimage imagenamed:@"canon.jpg"]; [cell setimage:image];  return cell; 

thank you!

try following code,

//cell.h  #import <uikit/uikit.h>  @interface detail : uitableviewcell  @property (nonatomic, retain) iboutlet uibutton *check; @property (nonatomic, retain) iboutlet uiimageview *img; @end   // cell.m  #import "cell.h"  @implementation detail  @synthesize option, img;     // viewcontroller.m      cell.img.image= [uiimage imagenamed:@"canon.jpg"];      return cell; 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -