<?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: Sliding Views On and Off Screen &#8211; Part 1 &#8211; Creating a Reusable Sliding Message Widget</title>
	<atom:link href="http://iPhoneDeveloperTips.com/user-interface/sliding-views-on-and-off-screen-creating-a-reusable-sliding-message-widget.html/feed" rel="self" type="application/rss+xml" />
	<link>http://iPhoneDeveloperTips.com/user-interface/sliding-views-on-and-off-screen-creating-a-reusable-sliding-message-widget.html</link>
	<description>iOS Developer Tips, Tricks and Tutorials.</description>
	<lastBuildDate>Wed, 08 Feb 2012 06:31:16 -0600</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Teukka Salama</title>
		<link>http://iPhoneDeveloperTips.com/user-interface/sliding-views-on-and-off-screen-creating-a-reusable-sliding-message-widget.html#comment-62287</link>
		<dc:creator>Teukka Salama</dc:creator>
		<pubDate>Sun, 06 Nov 2011 15:10:19 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3073#comment-62287</guid>
		<description>to avoid problems with releasing i have added to my version a removeFromSuperview check before releasing self.

- (void)animationDidStop:(NSString*)animationID finished:(BOOL)finished context:(void *)context 
{
		// Release
	if ([self.view superview])
		[self.view removeFromSuperview];
	[self release];
}</description>
		<content:encoded><![CDATA[<p>to avoid problems with releasing i have added to my version a removeFromSuperview check before releasing self.</p>
<p>- (void)animationDidStop:(NSString*)animationID finished:(BOOL)finished context:(void *)context<br />
{<br />
		// Release<br />
	if ([self.view superview])<br />
		[self.view removeFromSuperview];<br />
	[self release];<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PenguinsInAZ</title>
		<link>http://iPhoneDeveloperTips.com/user-interface/sliding-views-on-and-off-screen-creating-a-reusable-sliding-message-widget.html#comment-60630</link>
		<dc:creator>PenguinsInAZ</dc:creator>
		<pubDate>Tue, 27 Sep 2011 20:41:21 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3073#comment-60630</guid>
		<description>Absolutely fantastic! Saved me HOURS of tinkering. Thanks!</description>
		<content:encoded><![CDATA[<p>Absolutely fantastic! Saved me HOURS of tinkering. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evan Buxton</title>
		<link>http://iPhoneDeveloperTips.com/user-interface/sliding-views-on-and-off-screen-creating-a-reusable-sliding-message-widget.html#comment-19263</link>
		<dc:creator>Evan Buxton</dc:creator>
		<pubDate>Thu, 08 Jul 2010 19:28:39 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3073#comment-19263</guid>
		<description>Is there a way to make it fire only once? Right now I can keep tapping and creating many copies of this pop up slider.</description>
		<content:encoded><![CDATA[<p>Is there a way to make it fire only once? Right now I can keep tapping and creating many copies of this pop up slider.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Collateral</title>
		<link>http://iPhoneDeveloperTips.com/user-interface/sliding-views-on-and-off-screen-creating-a-reusable-sliding-message-widget.html#comment-6891</link>
		<dc:creator>Collateral</dc:creator>
		<pubDate>Fri, 20 Nov 2009 08:33:44 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3073#comment-6891</guid>
		<description>Thanks :) I was looking for something Just like this!</description>
		<content:encoded><![CDATA[<p>Thanks :) I was looking for something Just like this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Muchow</title>
		<link>http://iPhoneDeveloperTips.com/user-interface/sliding-views-on-and-off-screen-creating-a-reusable-sliding-message-widget.html#comment-6416</link>
		<dc:creator>John Muchow</dc:creator>
		<pubDate>Mon, 09 Nov 2009 03:28:30 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3073#comment-6416</guid>
		<description>nebula_1979, thanks for the great tip, I&#039;ve updated the original post.

John</description>
		<content:encoded><![CDATA[<p>nebula_1979, thanks for the great tip, I&#8217;ve updated the original post.</p>
<p>John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nebula_1979</title>
		<link>http://iPhoneDeveloperTips.com/user-interface/sliding-views-on-and-off-screen-creating-a-reusable-sliding-message-widget.html#comment-4837</link>
		<dc:creator>nebula_1979</dc:creator>
		<pubDate>Sat, 05 Sep 2009 09:15:55 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3073#comment-4837</guid>
		<description>To avoid issue of release msgVC 

&lt;pre lang=&quot;objc&quot;&gt;
// Cleanup...somewhere down the line, you need to do this
//  [msgVC release];
&lt;/pre&gt;

I changed hideMsg function to release automatically the view after animation is done:

&lt;pre lang=&quot;objc&quot;&gt;
- (void)hideMsg;
{
  // Slide the view down off screen
  CGRect frame = self.view.frame;
  
  [UIView beginAnimations:nil context:NULL];
  [UIView setAnimationDuration:.75];

  frame.origin.y = 480;
  self.view.frame = frame;
  
  //to autorelease the Msg, define stop selector
  [UIView setAnimationDelegate:self];
  [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
    
  [UIView commitAnimations];
}

- (void)animationDidStop:(NSString*)animationID finished:(BOOL)finished context:(void *)context {
    [self release];
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>To avoid issue of release msgVC</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #11740a; font-style: italic;">// Cleanup...somewhere down the line, you need to do this</span>
<span style="color: #11740a; font-style: italic;">//  [msgVC release];</span></pre></div></div>

<p>I changed hideMsg function to release automatically the view after animation is done:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>hideMsg;
<span style="color: #002200;">&#123;</span>
  <span style="color: #11740a; font-style: italic;">// Slide the view down off screen</span>
  CGRect frame <span style="color: #002200;">=</span> self.view.frame;
&nbsp;
  <span style="color: #002200;">&#91;</span>UIView beginAnimations<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span> context<span style="color: #002200;">:</span><span style="color: #a61390;">NULL</span><span style="color: #002200;">&#93;</span>;
  <span style="color: #002200;">&#91;</span>UIView setAnimationDuration<span style="color: #002200;">:</span>.75<span style="color: #002200;">&#93;</span>;
&nbsp;
  frame.origin.y <span style="color: #002200;">=</span> <span style="color: #2400d9;">480</span>;
  self.view.frame <span style="color: #002200;">=</span> frame;
&nbsp;
  <span style="color: #11740a; font-style: italic;">//to autorelease the Msg, define stop selector</span>
  <span style="color: #002200;">&#91;</span>UIView setAnimationDelegate<span style="color: #002200;">:</span>self<span style="color: #002200;">&#93;</span>;
  <span style="color: #002200;">&#91;</span>UIView setAnimationDidStopSelector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>animationDidStop<span style="color: #002200;">:</span>finished<span style="color: #002200;">:</span>context<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;
&nbsp;
  <span style="color: #002200;">&#91;</span>UIView commitAnimations<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>animationDidStop<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>animationID finished<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>finished context<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>context <span style="color: #002200;">&#123;</span>
    <span style="color: #002200;">&#91;</span>self release<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: John Muchow</title>
		<link>http://iPhoneDeveloperTips.com/user-interface/sliding-views-on-and-off-screen-creating-a-reusable-sliding-message-widget.html#comment-4302</link>
		<dc:creator>John Muchow</dc:creator>
		<pubDate>Fri, 14 Aug 2009 23:23:49 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3073#comment-4302</guid>
		<description>JFMartin,

With 2.2.1, did you try a device or the simulator? I deployed that code in a 2.2.1 build and it seemed to work...</description>
		<content:encoded><![CDATA[<p>JFMartin,</p>
<p>With 2.2.1, did you try a device or the simulator? I deployed that code in a 2.2.1 build and it seemed to work&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JFMartin</title>
		<link>http://iPhoneDeveloperTips.com/user-interface/sliding-views-on-and-off-screen-creating-a-reusable-sliding-message-widget.html#comment-4301</link>
		<dc:creator>JFMartin</dc:creator>
		<pubDate>Fri, 14 Aug 2009 22:07:54 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3073#comment-4301</guid>
		<description>Hi,

Thx a lot for this ! Tried your Xcode project and works fine in 3.0... in 2.2.1, the scroll off the screen doesn&#039;t work... the view just disappear... weird...</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thx a lot for this ! Tried your Xcode project and works fine in 3.0&#8230; in 2.2.1, the scroll off the screen doesn&#8217;t work&#8230; the view just disappear&#8230; weird&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GeauxApple</title>
		<link>http://iPhoneDeveloperTips.com/user-interface/sliding-views-on-and-off-screen-creating-a-reusable-sliding-message-widget.html#comment-4298</link>
		<dc:creator>GeauxApple</dc:creator>
		<pubDate>Fri, 14 Aug 2009 03:40:38 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3073#comment-4298</guid>
		<description>Great Tutorial...

One question how could you implement upon touch the pop-up screen goes to the 480 or y view???  I have an intro movie on  my app and if someone bypasses the movie they have to wait for the pop-up to go away before they can get to the meat of my app.

Thanks in advance</description>
		<content:encoded><![CDATA[<p>Great Tutorial&#8230;</p>
<p>One question how could you implement upon touch the pop-up screen goes to the 480 or y view???  I have an intro movie on  my app and if someone bypasses the movie they have to wait for the pop-up to go away before they can get to the meat of my app.</p>
<p>Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://iPhoneDeveloperTips.com/user-interface/sliding-views-on-and-off-screen-creating-a-reusable-sliding-message-widget.html#comment-4282</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Tue, 11 Aug 2009 16:49:26 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=3073#comment-4282</guid>
		<description>Great tutorial!  Keep them coming!  Im working on one that will pass in an image as well.</description>
		<content:encoded><![CDATA[<p>Great tutorial!  Keep them coming!  Im working on one that will pass in an image as well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

