Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I want put over an UIImage a small UIImageView and I want as result an UIImage, what can I do?
您必须创建一个新的图形上下文 ( UIGraphicsBeginImageContextWithOptions()),然后将两个图像绘制到上下文 ( -[UIImage drawInRect:]) 中,然后从上下文中检索图像 ( UIGraphicsGetImageFromCurrentImageContext())。
UIGraphicsBeginImageContextWithOptions()
-[UIImage drawInRect:]
UIGraphicsGetImageFromCurrentImageContext()
最后别忘了打电话UIGraphicsEndImageContext()。
UIGraphicsEndImageContext()