iphone - create UIImageView with portion of image file -


I am subclassing UIImageView to create a tile-based application. Basically, I have a single I am taking the image file and breaking it into pieces, and then I declare pieces in my tile ( UIImageViews ) so that they can be freely manipulated.

What is the best way to capture the part of an image and use it to attract UIImageView ? I thought of overriding the drawRect and using the CGAffineTransform , but it seems that there should be an easy way to do this, possibly a CGRect UIImage is sent to UIImageView , but I do not see the API for this.

here we go:

  UIImage * img = [UIImage imageNamed : @ "MyImage.jpg"]; CGRTEMFframe = CGRAtech (X, Y, Tile Wide, Tile High); CGImageRef imageRef = CIMMage Crete with ImageInRect ([IMG CIMMGE], IMG Frame); UIImage * All Image = [UIImage imageWithCGImage: imageRef]; CGImageRelease (imageRef);  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -