开发者

how to flick and scroll horizontally

I am trying to do something similar to http://www.winktoolkit.org/previews/63/

As you can see from the youtube video, It开发者_开发问答 has three section I need to do two only.

So the idea is there will be bunch of images divided into two sections and both the sections can be scrolled horizontally by just flicking just like iphone photo app, you see an image and flick it you see another image, you can flick backward and forward. To be more specific, I have put an image of the wireframe that I am working on

https://picasaweb.google.com/lh/photo/PZ-3H3VEujd7b2w9V3UJlJSL2rubFpkbdgdHPXy8M2Q?feat=directlink

EDIT: I should also be able to find out, which image the user has taped on, based on that I have to take some action, for example a detail page.

Thanks for your help.

Thanks, Yogesh


U can use page control.They are also using page control in the video.


The video looks like its a webpage. You might want to consider have a tableview with scrollviews in each row

To detemine which image has been pressed you can add each image as a button not just a standard image and tag each button

Set the delegate of the button and handle the button press, pull out the tag and deal with it


If you want to code it in Objective-C, you need a UIScrollView and set it's property pagingEnabled to YES and the property contentSize to widthOfOnePage*numberOfPages.

To get the "bullets" you need a UIPageControl. Keep in mind that the UIPageControl does not get updated automatically but you can use the UIScrollView delegate method - (void)scrollViewDidScroll:(UIScrollView *)scrollView to update the active bullet in the UIPageControl.

For getting the image the user tapped on, use the - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜