I have UITableViewCell
in my app:
@interface ResultCell : UITableViewCell {
IBOutlet UILabel *name;
IBOutlet UILabel *views;
IBOutlet UILabel *time;
IBOutlet UILabel *rating;
IBOutlet UILabel *artist;
IBOutlet UIImageView *img;
}
@property (nonatomic, retain) UILabel *name;
@property (nonatomic, retain) UILabel *views;
@property (nonatomic, retain) UILabel *time;
@property (nonatomic, retain) UILabel *rating;
@property (nonatomic, retain) UILabel *artist;
@property (nonatomic, retain) UIImageView *img;
@end
And all of this IBOutlet
connected in the Xib file to UILabel
....
This is how i create each cell:
static NSString *CellIdentifier = @"ResultCell";
ResultCell *cell = (ResultCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil){
UIViewController *vc = [[[UIViewController alloc] initWithNibName:@"ResultCell" bundle:nil] autorelease];
cell = (ResultCell *) vc.view;
}
cell.name.text = item.name;
cell.views.text = item.viewCount;
cell.rating.text = [NSString stringWithFormat:@"%d%%",item.rating];
cell.time.text = item.timeStr;
cell.artist.text = item.artist;
And i want to know if in the ResultCell
class i need to implement a dealoc method and release the UILabel
? or it's ok like what i done? i am using Non-ARC because it is an old project.