Use a section of a UIImage to create a new UIImage
I'm fairly new to Ios programming and was hoping someone can help me here or point me in the right direction.
How I would I create a new image from part of an existin开发者_开发知识库g one?
For example, if I have an UIImage in a UIImageView, that is 100 pixels(or points) square, and I want to create a new UIImage from a section of the original.
This new UIImage might be 10 pixels square and start at the origin of the original UIImage ( it could be anywhere really ). I might then take this new image and display it in another view or add it to an array etc.
Or another way to explain might be if I had an image of one face of a Rubix cube... and I then wanted to create new images for each of the different coloured squares...
Any help or ideas will be much appreciated.
精彩评论