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 07-10-2011, 08:19 AM   #1 (permalink)
Registered Member
 
Join Date: May 2011
Posts: 135
thephotographer is on a distinguished road
Default UIScrollView touch problems with subview

hi,

i have a scroll view, and on one of the scrollview pages, i have a UIView with rub and reveal image in it. you rub your finger on the screen and it scratches away the top image revealing the image underneath. my problem is, when its in the scrollview the rub and reveal only works in a perfectly vertical swipe. as soon as you start to swipe your finger left or right it stops rubbing away and starts scrolling the scrollview. i have tried everything i could think of and spent hours searching these forums and google but cant work it out. i know there is a solution, on some pages in the scrollview i have UIWebViews and they work perfectly, touching within the webview scrolls the webview and not the scrollview, i want the same thing for my rub and reveal UIView.

if anyone has any suggestions it would be much appreciated! thanks.
thephotographer is offline   Reply With Quote
Old 09-11-2011, 03:08 AM   #2 (permalink)
Registered Member
 
Join Date: May 2011
Posts: 135
thephotographer is on a distinguished road
Default

Hi, Wondering if anyone reading has any ideas? even just ideas on where to point me.. its really got me stuck! i know its possible, i just have no idea how to do it. i basically want to be able to add a UIView as a subview to the ScrollView, and any touch or drags or anything within the bounds of that UIView are not used by the UIScrollView.

any help would or even just ideas or theories would be great! thanks

to see what im doing, download Evokke Magazine for iphone from the app store, its free, go to the rub and reveal page and youll see what i mean. currently as a dodgy work around i put a start button which adds the rub and reveal to the app view, and when finished press back to remove the rub and reveal view. but i want to have it embedded within the UIScrollview, so when you come to the rub and reveal page you simply touch the page to rub and reveal without having to go to a seperate view.

Last edited by thephotographer; 09-11-2011 at 03:11 AM.
thephotographer is offline   Reply With Quote
Old 09-11-2011, 03:47 AM   #3 (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 what you mean....but try
Code:
[scrollView setDelaysContentTouches:NO];
__________________
dany_dev is offline   Reply With Quote
Old 09-13-2011, 09:09 AM   #4 (permalink)
Registered Member
 
Join Date: May 2011
Posts: 135
thephotographer is on a distinguished road
Default

Quote:
Originally Posted by dany_dev View Post
i'm not sure to understand what you mean....but try
Code:
[scrollView setDelaysContentTouches:NO];
it nearly works... initially the rub and reveal worked if i dragged perfectly vertical, any horizontal movement would stop revealing and start scrolling pages.

canCancelContentTouches = NO - dragging vertically instantly starts rub and reveal as before, but now movement into horizontal directions continues rub and reveal without swiping pages. rub and reveal also starts by holding my finger still for half a second on the screen, then moving any direction does rub and reveal. this is nearly what i want, except i want it to instantly rub and reveal without the half a second wait.

canCancelContentTouches = NO and delaysContentTouches = NO - rub and reveal works perfectly. instantly starts rub and reveal by dragging my finger in any direction. BUT one major issue. as soon as i set both of these cancelcontenttouches and delayscontenttouches to NO, i can no longer swipe to change pages in my scrollview. swiping doesnt work from any page.

i am very confused to why when i set both of those to NO my scrollview can no longer scroll.

does anyone have any clues on why this is? thanks!
thephotographer is offline   Reply With Quote
Reply

Bookmarks

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: 369
9 members and 360 guests
apatsufas, chemistry, Kirkout, leostc, lzwasyc, MarkC, Sami Gh, SamorodovAlex, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,664
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Leslie80
Powered by vBadvanced CMPS v3.1.0

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