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 01-25-2011, 08:58 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 67
Pyrrhic Victory is on a distinguished road
Default TouchesBegan in a custom ScrollView

I have read quite a few instances of people having similar issues and I've tried their techniques, but to no avail.

My app requires a scrollview which I can extract the location of touches within that scrollview. I'm ok with handling the math of the co-ordinates afterwards, but I explicitly need have it from the scrollview, not the main window. The touches will mostly be on the right hand side, so it shouldn't interfere with scrolling. I cannot use buttons for several reasons.

I created a subclass of UIScrollView and created a touchesBegan method within it. When I turn off the User Interaction Enabled, it works but I cannot scroll. I'm not sure if code will help because I'm trying a simple Alert Dialog for now.

My subclass of UIScrollView (customScroll) was added in Interface Builder, but I'm adding the contents dynamically.
Pyrrhic Victory is offline   Reply With Quote
Old 01-26-2011, 05:53 AM   #2 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

i'm not sure to understand the problem, however if you aren't able to add content dinamically on uiscrollview, take a look to ScrollViewSuite
__________________
dany_dev is offline   Reply With Quote
Old 01-26-2011, 08:44 AM   #3 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 67
Pyrrhic Victory is on a distinguished road
Default

Quote:
Originally Posted by dany88 View Post
i'm not sure to understand the problem, however if you aren't able to add content dinamically on uiscrollview, take a look to ScrollViewSuite
I will check that out. Thank you for responding.

My problem is that I need to get the x,y co-ordinates of a touch in the scrollview. So if you touch at the beginning of the scroll view you might return x = 25, y =15. When you scroll down and touch the same part of the screen, you get a x = 25, y = 215.

I'm not sure if it's possible.
Pyrrhic Victory is offline   Reply With Quote
Reply

Bookmarks

Tags
scrollview, touchesbegan

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: 361
11 members and 350 guests
7twenty7, Clouds, dre, EvilElf, iAppDeveloper, jeroenkeij, Mah6447, Morrisone, Sami Gh, stanny, toon4413
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,667
Threads: 94,121
Posts: 402,899
Top Poster: BrianSlick (7,990)
Welcome to our newest member, host number one
Powered by vBadvanced CMPS v3.1.0

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