<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: UIScrollView and UIDatePicker (or UIPickerView)</title>
	<atom:link href="http://www.alexc.me/uiscrollview-and-uidatepicker/153/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alexc.me/uiscrollview-and-uidatepicker/153/</link>
	<description>Fun things about web development, Facebook, iPhone, and whatever else I happen to be working on.</description>
	<pubDate>Sun, 05 Feb 2012 17:19:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ali amin</title>
		<link>http://www.alexc.me/uiscrollview-and-uidatepicker/153/comment-page-1/#comment-2151</link>
		<dc:creator>Ali amin</dc:creator>
		<pubDate>Sun, 20 Nov 2011 11:03:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexc.me/?p=153#comment-2151</guid>
		<description>thank you Alan. your solution works

I only added 

-(BOOL)delaysContentTouches(Uiview *)view {
if ([view isKindOfClass:[UIPickerView class]] &#124;&#124; [@"UIPickerTable" isEqualToString:[[view class] description]] ) {
return NO;
}
return [super touchesShouldCancelInContentView:view];
}

and modefied touchesShouldBegin to be like this

- (BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view {
if ([view isKindOfClass:[UIPickerView class]] &#124;&#124; [@"UIPickerTable" isEqualToString:[[view class] description]] ) {
//&#124;&#124; [view isKindOfClass:[UIPicker class]]
return YES;
}
return [super touchesShouldBegin:touches withEvent:event inContentView:self];  // self instead of view
}</description>
		<content:encoded><![CDATA[<p>thank you Alan. your solution works</p>
<p>I only added </p>
<p>-(BOOL)delaysContentTouches(Uiview *)view {<br />
if ([view isKindOfClass:[UIPickerView class]] || [@"UIPickerTable" isEqualToString:[[view class] description]] ) {<br />
return NO;<br />
}<br />
return [super touchesShouldCancelInContentView:view];<br />
}</p>
<p>and modefied touchesShouldBegin to be like this</p>
<p>- (BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view {<br />
if ([view isKindOfClass:[UIPickerView class]] || [@"UIPickerTable" isEqualToString:[[view class] description]] ) {<br />
//|| [view isKindOfClass:[UIPicker class]]<br />
return YES;<br />
}<br />
return [super touchesShouldBegin:touches withEvent:event inContentView:self];  // self instead of view<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Malaar</title>
		<link>http://www.alexc.me/uiscrollview-and-uidatepicker/153/comment-page-1/#comment-2123</link>
		<dc:creator>Malaar</dc:creator>
		<pubDate>Fri, 05 Aug 2011 12:26:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexc.me/?p=153#comment-2123</guid>
		<description>Great. This was helpfull.</description>
		<content:encoded><![CDATA[<p>Great. This was helpfull.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Kotian</title>
		<link>http://www.alexc.me/uiscrollview-and-uidatepicker/153/comment-page-1/#comment-2099</link>
		<dc:creator>Peter Kotian</dc:creator>
		<pubDate>Tue, 15 Mar 2011 09:48:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexc.me/?p=153#comment-2099</guid>
		<description>You have to set both:

[myView setDelaysContentTouches:NO];
[myView setCanCancelContentTouches:NO];</description>
		<content:encoded><![CDATA[<p>You have to set both:</p>
<p>[myView setDelaysContentTouches:NO];<br />
[myView setCanCancelContentTouches:NO];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan</title>
		<link>http://www.alexc.me/uiscrollview-and-uidatepicker/153/comment-page-1/#comment-1547</link>
		<dc:creator>Alan</dc:creator>
		<pubDate>Mon, 03 Jan 2011 22:54:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexc.me/?p=153#comment-1547</guid>
		<description>I created a UIScrollView subclass and overrode the following methods

@interface PickerAwareUIScrollView : UIScrollView {
}
- (BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view;
- (BOOL)touchesShouldCancelInContentView:(UIView *)view;

- (BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view {
	if ([view isKindOfClass:[UIPickerView class]]  &#124;&#124; [@"UIPickerTable" isEqualToString:[[view class] description]] ) {
		//&#124;&#124; [view isKindOfClass:[UIPicker class]] 
		return YES;
	}
	return [super touchesShouldBegin:touches withEvent:event inContentView:view];
}

- (BOOL)touchesShouldCancelInContentView:(UIView *)view {
	if ([view isKindOfClass:[UIPickerView class]]  &#124;&#124; [@"UIPickerTable" isEqualToString:[[view class] description]] ) {
		return NO;
	}
	return [super touchesShouldCancelInContentView:view];
}</description>
		<content:encoded><![CDATA[<p>I created a UIScrollView subclass and overrode the following methods</p>
<p>@interface PickerAwareUIScrollView : UIScrollView {<br />
}<br />
- (BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view;<br />
- (BOOL)touchesShouldCancelInContentView:(UIView *)view;</p>
<p>- (BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view {<br />
	if ([view isKindOfClass:[UIPickerView class]]  || [@"UIPickerTable" isEqualToString:[[view class] description]] ) {<br />
		//|| [view isKindOfClass:[UIPicker class]]<br />
		return YES;<br />
	}<br />
	return [super touchesShouldBegin:touches withEvent:event inContentView:view];<br />
}</p>
<p>- (BOOL)touchesShouldCancelInContentView:(UIView *)view {<br />
	if ([view isKindOfClass:[UIPickerView class]]  || [@"UIPickerTable" isEqualToString:[[view class] description]] ) {<br />
		return NO;<br />
	}<br />
	return [super touchesShouldCancelInContentView:view];<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toubey</title>
		<link>http://www.alexc.me/uiscrollview-and-uidatepicker/153/comment-page-1/#comment-1542</link>
		<dc:creator>Toubey</dc:creator>
		<pubDate>Mon, 03 Jan 2011 10:18:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexc.me/?p=153#comment-1542</guid>
		<description>In my case - using the above code simply disabled the scrolling of the scrollView - unfortunately I do need to be able to scroll, except when using the picker. Any ideas?</description>
		<content:encoded><![CDATA[<p>In my case - using the above code simply disabled the scrolling of the scrollView - unfortunately I do need to be able to scroll, except when using the picker. Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip</title>
		<link>http://www.alexc.me/uiscrollview-and-uidatepicker/153/comment-page-1/#comment-1080</link>
		<dc:creator>Philip</dc:creator>
		<pubDate>Mon, 20 Sep 2010 01:19:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexc.me/?p=153#comment-1080</guid>
		<description>Thanks, solved my problem.</description>
		<content:encoded><![CDATA[<p>Thanks, solved my problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle</title>
		<link>http://www.alexc.me/uiscrollview-and-uidatepicker/153/comment-page-1/#comment-910</link>
		<dc:creator>Kyle</dc:creator>
		<pubDate>Fri, 13 Aug 2010 18:13:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexc.me/?p=153#comment-910</guid>
		<description>Thanks Ian, that worked great.</description>
		<content:encoded><![CDATA[<p>Thanks Ian, that worked great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian</title>
		<link>http://www.alexc.me/uiscrollview-and-uidatepicker/153/comment-page-1/#comment-801</link>
		<dc:creator>Ian</dc:creator>
		<pubDate>Thu, 17 Jun 2010 07:04:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexc.me/?p=153#comment-801</guid>
		<description>You also have to set: @property(nonatomic) BOOL delaysContentTouches to no</description>
		<content:encoded><![CDATA[<p>You also have to set: @property(nonatomic) BOOL delaysContentTouches to no</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://www.alexc.me/uiscrollview-and-uidatepicker/153/comment-page-1/#comment-757</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Thu, 13 May 2010 17:35:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexc.me/?p=153#comment-757</guid>
		<description>I got mine to work by adding only the line of code he mentioned.  Seems silly to mention this but: in order to get the picker control to move you must keep you finger on the picker control "a little longer" so the picker control gets the action and not the scrollview.  From what I've read the scrollview works with a timer and if there is no swipe/flick by the time the timer fires the action is then passed to the underlying control.

Hope this helps.</description>
		<content:encoded><![CDATA[<p>I got mine to work by adding only the line of code he mentioned.  Seems silly to mention this but: in order to get the picker control to move you must keep you finger on the picker control &#8220;a little longer&#8221; so the picker control gets the action and not the scrollview.  From what I&#8217;ve read the scrollview works with a timer and if there is no swipe/flick by the time the timer fires the action is then passed to the underlying control.</p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil Pearce</title>
		<link>http://www.alexc.me/uiscrollview-and-uidatepicker/153/comment-page-1/#comment-754</link>
		<dc:creator>Phil Pearce</dc:creator>
		<pubDate>Fri, 07 May 2010 14:43:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexc.me/?p=153#comment-754</guid>
		<description>Has anyone got this working?</description>
		<content:encoded><![CDATA[<p>Has anyone got this working?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

