<?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: Detect Single Tap in UIScrollView</title>
	<atom:link href="http://MobileDeveloperTips.com/user-interface/detect-single-tap-in-uiscrollview.html/feed" rel="self" type="application/rss+xml" />
	<link>http://MobileDeveloperTips.com/user-interface/detect-single-tap-in-uiscrollview.html</link>
	<description>iOS and Objective-C Tips, Tricks and Tutorials.</description>
	<lastBuildDate>Tue, 22 May 2012 11:53:47 -0500</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Oza Klanjsek</title>
		<link>http://MobileDeveloperTips.com/user-interface/detect-single-tap-in-uiscrollview.html#comment-65344</link>
		<dc:creator>Oza Klanjsek</dc:creator>
		<pubDate>Thu, 05 Jan 2012 03:06:29 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3338#comment-65344</guid>
		<description>Thank you very much! 

I couldn&#039;t believe that just a rebuild with Xcode 4.2 messed up this. This is a reasonable explanation. And now it works!</description>
		<content:encoded><![CDATA[<p>Thank you very much! </p>
<p>I couldn&#8217;t believe that just a rebuild with Xcode 4.2 messed up this. This is a reasonable explanation. And now it works!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://MobileDeveloperTips.com/user-interface/detect-single-tap-in-uiscrollview.html#comment-64119</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Thu, 08 Dec 2011 02:46:20 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3338#comment-64119</guid>
		<description>Thanks, Ed Rackham! It works!</description>
		<content:encoded><![CDATA[<p>Thanks, Ed Rackham! It works!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jerry</title>
		<link>http://MobileDeveloperTips.com/user-interface/detect-single-tap-in-uiscrollview.html#comment-64020</link>
		<dc:creator>jerry</dc:creator>
		<pubDate>Tue, 06 Dec 2011 00:18:58 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3338#comment-64020</guid>
		<description>thank you Ed Rackham, i fixed touch event in iOS5. 
now It works!</description>
		<content:encoded><![CDATA[<p>thank you Ed Rackham, i fixed touch event in iOS5.<br />
now It works!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xavi</title>
		<link>http://MobileDeveloperTips.com/user-interface/detect-single-tap-in-uiscrollview.html#comment-62911</link>
		<dc:creator>Xavi</dc:creator>
		<pubDate>Thu, 17 Nov 2011 16:50:25 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3338#comment-62911</guid>
		<description>Thanks a lot. iOS5 is getting my crazy with this kind of stuff.

It is the fifth problem I have to solve because of iOS 5. At least it has a razonable explanation.

Just to make any one know, because I didn&#039;t find any explication.
I had an object which I need to change width and X position bounds. When I set new bounds, it changes X to -0. Crazy! I solved it setting bounds twice, first time for new X position, and second time for new Width.

First Code:
&gt; bounds.size.width = bounds.size.width + 40;
&gt; bounds.origin.x = ((bounds.size.width) * index;
&gt; pagingScrollView.bounds = bounds;

Solution code:
&gt; bounds.size.width = bounds.size.width + 40;
&gt; pagingScrollView.bounds = bounds;
&gt; bounds.origin.x = ((bounds.size.width) * index;
&gt; pagingScrollView.bounds = bounds;

I hope it can help.</description>
		<content:encoded><![CDATA[<p>Thanks a lot. iOS5 is getting my crazy with this kind of stuff.</p>
<p>It is the fifth problem I have to solve because of iOS 5. At least it has a razonable explanation.</p>
<p>Just to make any one know, because I didn&#8217;t find any explication.<br />
I had an object which I need to change width and X position bounds. When I set new bounds, it changes X to -0. Crazy! I solved it setting bounds twice, first time for new X position, and second time for new Width.</p>
<p>First Code:<br />
&gt; bounds.size.width = bounds.size.width + 40;<br />
&gt; bounds.origin.x = ((bounds.size.width) * index;<br />
&gt; pagingScrollView.bounds = bounds;</p>
<p>Solution code:<br />
&gt; bounds.size.width = bounds.size.width + 40;<br />
&gt; pagingScrollView.bounds = bounds;<br />
&gt; bounds.origin.x = ((bounds.size.width) * index;<br />
&gt; pagingScrollView.bounds = bounds;</p>
<p>I hope it can help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed Rackham</title>
		<link>http://MobileDeveloperTips.com/user-interface/detect-single-tap-in-uiscrollview.html#comment-62115</link>
		<dc:creator>Ed Rackham</dc:creator>
		<pubDate>Tue, 01 Nov 2011 13:17:04 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3338#comment-62115</guid>
		<description>Anyone else having problems with iOS5 / Xcode 4.2, you can fix it by adding the following to your UIScrollView subclass:

- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
    [self.nextResponder touchesBegan: touches withEvent:event]; 
}

iOS5 / Xcode 4.2 seems to need to register the touchesBegan before it will allow touchesEnded to exist.

So your full UIScrollView subclass .m will contain the following:

- (id)initWithFrame:(CGRect)frame {
    return [super initWithFrame:frame];
}

// This fixes it for iOS 5 / Xcode 4.2
- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
    [self.nextResponder touchesBegan:touches withEvent:event]; 
}

- (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
    if (!self.dragging){
        [self.nextResponder touchesEnded:touches withEvent:event]; 
    }
    else
        [super touchesEnded:touches withEvent:event];
}</description>
		<content:encoded><![CDATA[<p>Anyone else having problems with iOS5 / Xcode 4.2, you can fix it by adding the following to your UIScrollView subclass:</p>
<p>- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{<br />
    [self.nextResponder touchesBegan: touches withEvent:event];<br />
}</p>
<p>iOS5 / Xcode 4.2 seems to need to register the touchesBegan before it will allow touchesEnded to exist.</p>
<p>So your full UIScrollView subclass .m will contain the following:</p>
<p>- (id)initWithFrame:(CGRect)frame {<br />
    return [super initWithFrame:frame];<br />
}</p>
<p>// This fixes it for iOS 5 / Xcode 4.2<br />
- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{<br />
    [self.nextResponder touchesBegan:touches withEvent:event];<br />
}</p>
<p>- (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {<br />
    if (!self.dragging){<br />
        [self.nextResponder touchesEnded:touches withEvent:event];<br />
    }<br />
    else<br />
        [super touchesEnded:touches withEvent:event];<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amir</title>
		<link>http://MobileDeveloperTips.com/user-interface/detect-single-tap-in-uiscrollview.html#comment-62108</link>
		<dc:creator>Amir</dc:creator>
		<pubDate>Tue, 01 Nov 2011 10:12:37 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3338#comment-62108</guid>
		<description>hi,
 thanx for the info but I found its not working for sdk 5 any thoughts?

With my best,
Amir</description>
		<content:encoded><![CDATA[<p>hi,<br />
 thanx for the info but I found its not working for sdk 5 any thoughts?</p>
<p>With my best,<br />
Amir</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piotr</title>
		<link>http://MobileDeveloperTips.com/user-interface/detect-single-tap-in-uiscrollview.html#comment-57404</link>
		<dc:creator>Piotr</dc:creator>
		<pubDate>Sat, 06 Aug 2011 20:57:14 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3338#comment-57404</guid>
		<description>You are mighty. After few hours of frustration and futile efforts I finally found this article. Well done, guys!</description>
		<content:encoded><![CDATA[<p>You are mighty. After few hours of frustration and futile efforts I finally found this article. Well done, guys!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: skog</title>
		<link>http://MobileDeveloperTips.com/user-interface/detect-single-tap-in-uiscrollview.html#comment-57001</link>
		<dc:creator>skog</dc:creator>
		<pubDate>Sun, 31 Jul 2011 16:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3338#comment-57001</guid>
		<description>any way to update the scrollview&#039;s current offset in the super view?

i have a map with a rectangular slider that indicates the current position of the scrollview on the screen. i could update the position in the super view&#039;s gameloop if i could get the position somehow. everything i&#039;ve tried only updates the slider after any touch is finished.

thanks!</description>
		<content:encoded><![CDATA[<p>any way to update the scrollview&#8217;s current offset in the super view?</p>
<p>i have a map with a rectangular slider that indicates the current position of the scrollview on the screen. i could update the position in the super view&#8217;s gameloop if i could get the position somehow. everything i&#8217;ve tried only updates the slider after any touch is finished.</p>
<p>thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hanoi_toulouse</title>
		<link>http://MobileDeveloperTips.com/user-interface/detect-single-tap-in-uiscrollview.html#comment-52803</link>
		<dc:creator>hanoi_toulouse</dc:creator>
		<pubDate>Tue, 14 Jun 2011 15:54:56 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3338#comment-52803</guid>
		<description>many thanks UIScrollView dont eat my single click any more, nice work!!!</description>
		<content:encoded><![CDATA[<p>many thanks UIScrollView dont eat my single click any more, nice work!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeongho</title>
		<link>http://MobileDeveloperTips.com/user-interface/detect-single-tap-in-uiscrollview.html#comment-47723</link>
		<dc:creator>Jeongho</dc:creator>
		<pubDate>Wed, 27 Apr 2011 05:22:15 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3338#comment-47723</guid>
		<description>I like your tutorial, Very simple and you focus on core messages.

Good Job!!</description>
		<content:encoded><![CDATA[<p>I like your tutorial, Very simple and you focus on core messages.</p>
<p>Good Job!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

