I'm trying to create a UIScrollView (horizental) where the user can swipe through images left and right as seen in this photo (http://i.stack.imgur.com/GvtOr.jpg), where tapping on a photo would trigger an event.
I just need general advice on how to structure this programmatically, would really appreciate it.
use
[Scroller setContentSize:CGSizeMake(Scroller.frame.size.width*4,Scroller.frame.size.height)];
Related
I am developing an application in iPhone which has a UIScrollView to which I have added an array of image views (like thumbnails,using loop). The User can scroll either way horizontally and select a particular image. The image on which the user taps has to displayed in a separate UIImageView. I have achieved till the detection of tap on the UIScrollView.But I dunno how to determine which image received the tap so that I can show a preview of that in the UIImageView. How to achieve that ? Any help on this would be appreciated ! Thanks in advance.
When I meet UIScrollView and UIImageView.I always use UIButton instead of UIImageView and use setTag to get which button is pressed.
How do you capture the tap? If it's done by UIGestureRecognizer then you should not forget that a gesturerecognizer can be added only to one object. So you can not catch taps on multiple objects via just one gesturerecognizer. So, in your loop where you create those imageviews also create a UITapGestureRecognizer bound the that imageview.
What I want to accomplish is something like this:
Two different scrollViews, and each one scrolls horizontically. Each showing 3 images, and a half one (or 1/3th) piece of the next image in the datasource of the scrollview.
Does anyone know how to accomplish such a scrollview?
I also want to be able to tap an image to flip it and show some information and a button to the detail. (See lower scrollview).
Tapping it again would just show back the image, much like the coverflow ui inside itunes, but without the coverflow being 3D...
Any help is welcome :)
Thanks in advance,
Lewion
Scroll view doesn't have a datasource. What you are looking for is standard scrolling and nothing special.. So it is definitely doable... Check the scrolling and photo scroller sample codes from apple developer samples. For more implementations of scroll view check the scroll view suite sample code and read the scroll view programming guide.
The flip animation is also a standard animation for a view and is easily doable. For example, create a utility application for iphone. It has a flip side view. See how that animation is done.
Hej folks,
I got an UIView in my application and want to implement kind of a swipe gesture. I know how I detect this gesture (touchesBegan: and touchesEnded: for example is x coordinates are distanced more than 100 pixels or something else) but I really donĀ“t now how to animate my needs. In fact my UIView will contain subviews which are 9 UIButtons. On swipe I want to change the set of buttons programatically...any solutions out there? Primarily need the animation!
EDIT: I thought about programatically moving the buttons off-screen to the left and at the same time move the new ones on-screen from the right side. But it seems I don't really know how to realize this...isn't it too much leaking at the same time? Please give me a hint!
It's seem that you want to recreate somethings like the springboard but with button instead of icon.
I can suggest you to use UIScrollView.
why you don't load just a new view with the other button set in your window after the swipe gesture was detected?
im trying to make a image gallery and the user swipes through views like on the Photo app on the iphone. i heard page control was very good but it has a limit of 20 bullets and i need more swipes. what would you guys recommend?
Check out the Three20 framework. You're job is almost done for you.
Either the three20 as said or a scroll view (without paging) and an uiimageview inside that with uiimages.
I have an iPhone application that uses a UIScrollView to display a larger version of an image on the main screen. I am using IB to create the main screen that has text, small images, and price about a product. I have it setup to show/hide the UIScrollView if the user touches the small images. It works ok, but things are pretty messing in the IB layout. I have to put the UIScrollView over top of everything else and make it hidden by default. What I'd like to know is if there is a better way to accomplish this. Can I create a new nib and load the scroll view in it and load that nib when the users touches the small image? Should I construct the scroll view in my code and not use IB? Any input is appreciated!
Sorry if this is a newb question. I'm still learning.
Set scrollView.hidden = YES and then when tapped, set it to NO.