tags:

views:

23

answers:

1

HI i was following this example to create a slider gallery

"http://lievendekeyser.net/index.php?module=messagebox&action=message&msg_id=1351"

But i stuck at one point. what i am trying to do is, when user double tap on current image, it should navigate to another view, like to view B.

But i am not able to navigate and detect double tap on current image.

suggestions needed. regards

A: 

hi,

you can find the number of tap in touch event. and when count of tap == 2 then you should write code for further movements.

else put all these images in UIButton and provide the IBActions to all the buttons and perform the action. use following code

[ScrollViewFavButton addTarget:self action:@selector(FavClickButton:) forControlEvents:UIControlEventTouchUpInside]; ScrollViewFavButton.tag = i; [ScrlViewFavorite insertSubview:ScrollViewFavButton atIndex:i];

insert button in the scrollview and perform action in FacClickButton:.

I think now you'll get your answer.

iPhone Fun
thanks iPhone Fun for replying..just wanna ask u, i hv 25 images, where should i put the abbove code of urs for putting images on button.?
shishir.bobby
on button. put this code in a for loop and the buttons will be generated automatically. and you'll be able to perform the operation you need.
iPhone Fun
shishir.bobby
@shishir.bobby they are using different thing. They have provided different image view and performing the operations. And the code that i've provided is using scrollview. and I am inserting buttons or images whatever is needed in to the scroll view. so find the scroll view code and add above one in the viewdidload method of the file.
iPhone Fun