简体   繁体   English

如何在触摸事件中移动图像?

[英]How can i move images on touch event?

I have created a image gallery. 我创建了一个图片库。 I show all images from plist file in navigation view. 我在导航视图中显示plist文件中的所有图像。 When i open image in full view after that i have to back in navigation. 当我以全视图打开图像之后,我必须返回导航。 But i want to move images in scrolling when image in fullview. 但是我想在全屏显示图像时滚动移动图像。 After open image in full view i want to swap one by one next as well as previous... Is there possible..?? 以全视图打开图像后,我想与上一个以及下一个交换一个。是否可能.. ?? Plz give me help about any kind.. Regards.... 请给我任何形式的帮助。

Yes thats possible, make your fullview a scrollview with its contentsize having the same width as your screen and its height being the combined height of its subviews (put at least two or 3 imageviews in the scrollview as subviews). 是的,可以使全视图成为滚动视图,其内容大小与屏幕宽度相同,并且其高度是其子视图的总高度(在滚动视图中至少放置两个或三个图像视图作为子视图)。 You can add and remove UIImageviews as subviews of the uiscrollview as the user vertically pages through them. 您可以在用户垂直翻阅UIImageviews作为uiscrollview的子视图时将其添加和删除。 You will need to communicate with the navigation view what the table status is when your user returns to that view though so that everything matches up. 但是,当用户返回到该视图时,您将需要与导航视图进行通信,以了解表的状态,以便所有内容都匹配。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM