iphone - Draw CGImage in UITableView -
So, I have a custom cell and I want to draw all images in the tableview as CGI image, but I Can not get the work done. I have created a test project and tested the code with simple scenes. Everything was perfect, and when I copied the same code in my custom cell, it stopped working here:
- (zero) direct: (CGRact) rect { CGRect contentRect = self.contentView.bounds; CGflat bound x = contentRect.origin.x; UIImage * Action image = [UIImage imageNamed: @ "karma.png"]; [Self illustration: Image with karma: Seagractemac (boundsx + 255, 16, 14, 14)]; } - (Zero) Draw Image: (UIImage *) Image with Image: (CGRact) Rect {CGImageRef imageRef = CGImageRetain (image.CGImage); CGContextRef Reference = UIGraphicsGetCurrentContext (); CGContextTranslateCTM (references, 0, rect.size.height); CGContextScaleCTM (Reference, 1.0, -1.0); CGContextDrawImage (reference, rect, imageRef); } Any solutions?
Apple recommends adding your custom instead of viewing UITableViewCell's content view instead of changing UITableViewCell See for example.
Comments
Post a Comment