Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-20-2008, 01:05 AM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 40
TheFury is on a distinguished road
Default View attached to UIScrollView not receiving touches events

I have MyView attached to a scroll view. MyView implements touchesBegan and touchesEnded. When it first comes up and I press and hold inside the view, I do NOT get touchesBegan. If, however, I press and drag to scroll the view, then press and hold inside the view, I DO get touchesBegan.

I don't expect to get a touchesBegan immediately since the scroll view is handling the scrolling aspect; but when I press and hold, I should get the event after a short delay. As I said, if I manually scroll the view before performing the press and hold, everything works as expected.

I see nothing in the UIScrollViewDelegate that could help. I see the touchesShouldBegin member of the UIScrollView interface; but the docs say the default return is YES. So I don't see how that's going to help me either.

Any suggestions?
TheFury is offline   Reply With Quote
Old 09-20-2008, 01:40 AM   #2 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 40
TheFury is on a distinguished road
Default View attached to UIScrollView not receiving touches events

BTW, if MyView is small enough that the contents does not require scrolling, touchesBegan is called as expected.
TheFury is offline   Reply With Quote
Old 09-20-2008, 01:58 AM   #3 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 40
TheFury is on a distinguished road
Default View attached to UIScrollView not receiving touches events

I got something working. FYI, I just derived from UIScrollView and handle the touchesBegan in that class.
TheFury is offline   Reply With Quote
Old 06-29-2009, 02:26 AM   #4 (permalink)
shiva
 
shiva.0537's Avatar
 
Join Date: Jun 2009
Location: Hyderabad
Age: 26
Posts: 54
shiva.0537 is on a distinguished road
Send a message via Skype™ to shiva.0537
Default

Quote:
Originally Posted by TheFury View Post
I got something working. FYI, I just derived from UIScrollView and handle the touchesBegan in that class.
Hi,

i am also doing same kind of app. When i put scrollView.userInteractionEnabled=NO; i am getting touchBegin, touchMoved and touchEnded working fine. But when scroll is not working.

What i am trying to do is, when i single tap on scrollview, i am hiding nav bar and tool bar(below) and when i double tap showing nav bar and tool bar.

Could you post, you code or send sample application.
shiva.0537 is offline   Reply With Quote
Old 07-17-2009, 05:54 AM   #5 (permalink)
New Member
 
Join Date: Mar 2009
Posts: 9
aanupaul is on a distinguished road
Default touches in scroll view

Hi

i am also doing same kind of app. When i put scrollView.userInteractionEnabled=NO; i am getting touchBegin, touchMoved and touchEnded working fine. But when try to zoom is not working.

what i have to do for getting both zoom effect & touch effects for the imageviews contained in scroll view

Thanks
Ann
aanupaul is offline   Reply With Quote
Old 07-20-2009, 11:45 PM   #6 (permalink)
shiva
 
shiva.0537's Avatar
 
Join Date: Jun 2009
Location: Hyderabad
Age: 26
Posts: 54
shiva.0537 is on a distinguished road
Send a message via Skype™ to shiva.0537
Default

Quote:
Originally Posted by aanupaul View Post
Hi

i am also doing same kind of app. When i put scrollView.userInteractionEnabled=NO; i am getting touchBegin, touchMoved and touchEnded working fine. But when try to zoom is not working.

what i have to do for getting both zoom effect & touch effects for the imageviews contained in scroll view

Thanks
Ann
Hi,

In developer.apple.com's sample codes, i have found one sample code "Scrollview suite" follow it you will get a solution. I am using that only.

Now my problem is solved.
shiva.0537 is offline   Reply With Quote
Old 05-29-2010, 07:34 AM   #7 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 25
Doggy is on a distinguished road
Default

Quote:
Originally Posted by shiva.0537 View Post
Hi,

In developer.apple.com's sample codes, i have found one sample code "Scrollview suite" follow it you will get a solution. I am using that only.

Now my problem is solved.
can you share it with us?
in the example of autoscroll in the scrollviewsuit

im trying to load more then one image, basically the same images of the thumbscroll view,but in the imagescrollview, so you can swipe through the images
Doggy is offline   Reply With Quote
Old 05-29-2010, 07:35 AM   #8 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 25
Doggy is on a distinguished road
Default

Quote:
Originally Posted by shiva.0537 View Post
Hi,

In developer.apple.com's sample codes, i have found one sample code "Scrollview suite" follow it you will get a solution. I am using that only.

Now my problem is solved.
can you share it with us?
in the example of autoscroll in the scrollviewsuit

im trying to load more then one image, basically the same images of the thumbscroll view,but in the imagescrollview and another size , so you can swipe through the images
Doggy is offline   Reply With Quote
Old 08-07-2010, 07:20 AM   #9 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 1
mk.bravo is on a distinguished road
Default

Quote:
Originally Posted by Doggy View Post
can you share it with us?
in the example of autoscroll in the scrollviewsuit

im trying to load more then one image, basically the same images of the thumbscroll view,but in the imagescrollview and another size , so you can swipe through the images

// this piece of code discards the keyboard from a text view or from a text field with keyboard type numberpad or that sort(with no return key)

UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTap];
[scrollView addGestureRecognizer: singleTap];

==

- (void) handleSingleTapid*) sender
{
NSLog(@"gesture rec picked up event");
if([textField isFirstResponder])
{
[textField resignFirstResponder];
}
}


cheers!
mk.bravo is offline   Reply With Quote
Old 09-28-2010, 02:48 PM   #10 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 20
vibhorgoyal is on a distinguished road
Default

You can find the scrollviewsuite code here:

https://developer.apple.com/library/...ion/Intro.html
__________________
droolJunkie
vibhorgoyal is offline   Reply With Quote
Reply

Bookmarks

Tags
touchesbegan, uiscrollview, uiview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 329
5 members and 324 guests
2Apps1Day, akacaj, SLIC, soohyun, Techgirl-52
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,650
Threads: 94,115
Posts: 402,887
Top Poster: BrianSlick (7,990)
Welcome to our newest member, soohyun
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:07 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0