【发布时间】:2014-03-20 11:33:00
【问题描述】:
在我的应用程序中,我有两个具有不同图像的不同图像视图。我的第二个图像视图小于第一个图像视图。用户可以使用 UITouch 事件更改第二个图像的位置。现在,我想将这两个图像保存为具有更改位置的单个图像.这是我更改图像位置的代码:
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:touch.view];
cloud.center = location;
}
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
[self touchesBegan:touches withEvent:event];
它工作正常但是,如何将两个图像视图合并到一个图像视图中?请帮助我。提前致谢。
【问题讨论】:
-
触摸后要合并图片
-
你可以从 UIView 创建一个 UIImage。在此处查看解决方案:stackoverflow.com/questions/4334233/…
标签: ios iphone objective-c uiimageview