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

View Single Post
Old 06-09-2011, 10:21 AM   #6 (permalink)
ElamvazhuthiK
Registered Member
 
Join Date: Jun 2009
Posts: 2
ElamvazhuthiK is on a distinguished road
Default

Quote:
Originally Posted by ricard.perez View Post
There's no need to subclass UIScrollView for this.
After researching for a while (and I've also tried the approach discussed right here), I've seen that with just two lines you'll get the perfect result:

scrollView.canCancelContentTouches = NO;
scrollView.delaysContentTouches = NO;

That's it!

But which control is drived from UIControl that controls are not make the scroll in scrollview.
Ex. we add the UIButton in UIScrollview then set the above mentioned property. That time the scroll function not enable in the UIButton region. But the UIPickerview control swipe or scroll. So we are override the UIScrollview function "- (BOOL)touchesShouldCancelInContentViewUIView *)view". So create the custom class inherited by UIScrollview and override that function like that EX.

EX.

- (BOOL)touchesShouldCancelInContentViewUIView *)view {
if ([view isKindOfClass:[UIPickerView class]] || [@"UIPickerTable" isEqualToString:[[view class] description]] ) {
return NO;
}
return YES;
}

Note:
-------
That method called only the Scrollview property canCancelContentTouches = YES.

So only set the property delaysContentTouches = NO. Because the canCancelContentTouches default value is YES.
ElamvazhuthiK is offline   Reply With Quote
 

» Advertisements
» Online Users: 384
19 members and 365 guests
13dario13, aaronredmond844, bbbsaha, cserft, DaveDee, fredidf, Hamood, Hercule, iShailesh, jacob7khan, Lily.P, loan2ameri, MysticLine, prbiztech, QuantumDoja, roof44, seokwon lee, Vijithasri06, wserver
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,600
Threads: 94,084
Posts: 402,781
Top Poster: BrianSlick (7,990)
Welcome to our newest member, loan2ameri
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:52 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.