How to set the table view cell accessory view to retain a previously initialized UIImageView?
问题 Let's say I have a property in my view controller, defined as follows: @property (nonatomic, retain) UIImageView *checkmarkOffAccessoryView; I @synthesize this in the implementation, release it in -dealloc and initialize it in -viewDidLoad as follows: self.checkmarkOffAccessoryView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"checkmarkOff.png"]] autorelease]; So far so good. When I use it in my table view delegate as an accessory view for multiple cells, two things happen: Only