<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Get Set Games &#187; UIActivityIndicatorView</title>
	<atom:link href="http://getsetgames.com/tag/uiactivityindicatorview/feed/" rel="self" type="application/rss+xml" />
	<link>http://getsetgames.com</link>
	<description></description>
	<lastBuildDate>Thu, 12 Jan 2012 20:12:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/><cloud domain='getsetgames.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<link rel="http://api.friendfeed.com/2008/03#sup" xmlns="http://www.w3.org/2005/Atom" type="application/json" href="http://friendfeed.com/api/public-sup.json#5c973c50be"/>		<item>
		<title>How to Display an Activity Indicator with UIActivityIndicatorView</title>
		<link>http://getsetgames.com/2009/12/03/iphonedev-advent-tip-3-how-to-display-an-activity-indicator-with-uiactivityindicatorview/</link>
		<comments>http://getsetgames.com/2009/12/03/iphonedev-advent-tip-3-how-to-display-an-activity-indicator-with-uiactivityindicatorview/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 15:19:00 +0000</pubDate>
		<dc:creator>Derek van Vliet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[advent]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[UIActivityIndicatorView]]></category>

		<guid isPermaLink="false">http://getsetgames.com/?p=729</guid>
		<description><![CDATA[We all wish that our apps could run without latency and pauses, but the reality is loading screens are needed from time to time. Today&#8217;s advent tip is how to [...]]]></description>
			<content:encoded><![CDATA[<p>We all wish that our apps could run without latency and pauses, but the reality is loading screens are needed from time to time. Today&#8217;s advent tip is how to display an activity indicator in your app like the one seen below. It&#8217;s great for soothing the savage, impatient user.</p>
<p><img src="http://getsetgames.com/wp-content/uploads/2009/12/ActivityIndicator.gif" alt="ActivityIndicator" title="ActivityIndicator" width="50" height="50" class="aligncenter size-full wp-image-731" /></p>
<p>It can actually be done with just a few lines of code. First, we create and position the UIActivityIndicatorView by doing the following. It needs to be added to a view, so be sure to replace &#8220;myView&#8221; with your own view.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">UIActivityIndicatorView <span style="color: #002200;">*</span>activityView <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIActivityIndicatorView alloc<span style="color: #002200;">&#93;</span> initWithActivityIndicatorStyle<span style="color: #002200;">:</span>UIActivityIndicatorViewStyleWhiteLarge<span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>myView addSubview<span style="color: #002200;">:</span> activityView<span style="color: #002200;">&#93;</span>;
activityView.center <span style="color: #002200;">=</span> CGPointMake<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">240</span>,<span style="color: #2400d9;">160</span><span style="color: #002200;">&#41;</span>;</pre></div></div>

<p>So now the activity indicator is created and positioned but it isn&#8217;t visible yet. You can make it visible at any time by running the following one line:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span>activityView startAnimating<span style="color: #002200;">&#93;</span>;</pre></div></div>

<p>Finally, once you&#8217;ve finished loading the copious amounts of awesomesauce that fuel your app, you can make the activity indicator go away by running the following solitary line of code:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span>activityView stopAnimating<span style="color: #002200;">&#93;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://getsetgames.com/2009/12/03/iphonedev-advent-tip-3-how-to-display-an-activity-indicator-with-uiactivityindicatorview/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:thumbnail url="http://getsetgames.com/wp-content/uploads/2009/12/ActivityIndicator.gif" />
		<media:content url="http://getsetgames.com/wp-content/uploads/2009/12/ActivityIndicator.gif" medium="image">
			<media:title type="html">ActivityIndicator</media:title>
		</media:content>
	</item>
	</channel>
</rss>

