<?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/"
	>

<channel>
	<title>OniDev &#187; iPhone</title>
	<atom:link href="http://www.onidev.com/category/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.onidev.com</link>
	<description>freelance iPhone design &#38; development</description>
	<lastBuildDate>Fri, 03 Sep 2010 14:41:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Disable deprecated warnings with GCC</title>
		<link>http://www.onidev.com/2010/08/27/disable-deprecated-warnings-with-gcc/</link>
		<comments>http://www.onidev.com/2010/08/27/disable-deprecated-warnings-with-gcc/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 10:32:22 +0000</pubDate>
		<dc:creator>Mitch</dc:creator>
				<category><![CDATA[Code Examples]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Deprecated]]></category>
		<category><![CDATA[GCC]]></category>
		<category><![CDATA[Warnings]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.onidev.com/?p=298</guid>
		<description><![CDATA[Recently I wrote some conditional code to call various methods depending on the version of iOS running on the device. A problem I came across was that because I still called some deprecated methods I was getting warnings during my build. As I treat all warnings as errors I had to find a solution which [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I wrote some conditional code to call various methods depending on the version of iOS running on the device. A problem I came across was that because I still called some deprecated methods I was getting warnings during my build. As I treat all warnings as errors I had to find a solution which would compile. #pragma was the answer.</p>
<p>You can use the following line to disable warnings for depreciated calls:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#pragma GCC diagnostic ignored &quot;-Wdeprecated-declarations&quot;</span></pre></div></div>

<p>And use this to re-enable it:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#pragma GCC diagnostic warning &quot;-Wdeprecated-declarations&quot;</span></pre></div></div>

<p>Here&#8217;s how I used it:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#pragma GCC diagnostic ignored &quot;-Wdeprecated-declarations&quot;</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span> initWithStyle<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableViewCellStyle<span style="color: #002200;">&#41;</span>style reuseIdentifier<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>reuseIdentifier
<span style="color: #002200;">&#123;</span>
  <span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>super respondsToSelector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>initWithStyle<span style="color: #002200;">:</span>reuseIdentifier<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>
  <span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span>self <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>super initWithStyle<span style="color: #002200;">:</span>style reuseIdentifier<span style="color: #002200;">:</span>reuseIdentifier<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>
    <span style="color: #002200;">&#123;</span>
      <span style="color: #002200;">&#91;</span>self setupCell<span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#125;</span>
  <span style="color: #002200;">&#125;</span>
  <span style="color: #a61390;">else</span>
  <span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span>self <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>super initWithFrame<span style="color: #002200;">:</span>CGRectZero reuseIdentifier<span style="color: #002200;">:</span>reuseIdentifier<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>
    <span style="color: #002200;">&#123;</span>
      <span style="color: #002200;">&#91;</span>self setupCell<span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#125;</span>
  <span style="color: #002200;">&#125;</span>
  <span style="color: #a61390;">return</span> self;
<span style="color: #002200;">&#125;</span>
<span style="color: #6e371a;">#pragma GCC diagnostic warning &quot;-Wdeprecated-declarations&quot;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.onidev.com/2010/08/27/disable-deprecated-warnings-with-gcc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>F1 Insider in the Paid App charts!</title>
		<link>http://www.onidev.com/2010/03/13/f1-insider-in-the-uk-charts/</link>
		<comments>http://www.onidev.com/2010/03/13/f1-insider-in-the-uk-charts/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 13:04:15 +0000</pubDate>
		<dc:creator>Mitch</dc:creator>
				<category><![CDATA[OniMobi]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[F1]]></category>
		<category><![CDATA[F1 Insider]]></category>
		<category><![CDATA[Formula 1]]></category>

		<guid isPermaLink="false">http://www.onidev.com/?p=250</guid>
		<description><![CDATA[F1 Insider, one of my apps (currently published by Greenius Mobile), is in the top 50 UK paid apps! We&#8217;re also sat in #2 in the UK sports charts.
Other territories are starting to catch up too. A great way to start the season!
I also have a major update in the works, which should bring some [...]]]></description>
			<content:encoded><![CDATA[<p>F1 Insider, one of my apps (currently published by Greenius Mobile), is in the top 50 UK paid apps! We&#8217;re also sat in #2 in the UK sports charts.</p>
<p>Other territories are starting to catch up too. A great way to start the season!</p>
<p>I also have a major update in the works, which should bring some nice new features, and help make F1 Insider the #1 independent F1 app.</p>
<p>Thanks to everyone for their support!</p>
<p>Check the app out here: <a href="http://www.f1insider.co.uk/download/">http://www.f1insider.co.uk/download/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.onidev.com/2010/03/13/f1-insider-in-the-uk-charts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UIImage resizing</title>
		<link>http://www.onidev.com/2010/03/11/uiimage-resizing/</link>
		<comments>http://www.onidev.com/2010/03/11/uiimage-resizing/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 15:51:29 +0000</pubDate>
		<dc:creator>Mitch</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[CoreGraphics]]></category>
		<category><![CDATA[Quartz]]></category>
		<category><![CDATA[Resize]]></category>
		<category><![CDATA[UIImage]]></category>

		<guid isPermaLink="false">http://www.onidev.com/?p=248</guid>
		<description><![CDATA[UIImage is a great class, but it has a lot of limitations.
Image resizing is one of them (the lack of). If your looking for a way to re-size UIImages, save your self the agony of copy/pasting the numerous code examples you&#8217;ll find through stackoverflow or whatever. I was shocked by the amount of people posting [...]]]></description>
			<content:encoded><![CDATA[<p>UIImage is a great class, but it has a lot of limitations.</p>
<p>Image resizing is one of them (the lack of). If your looking for a way to re-size UIImages, save your self the agony of copy/pasting the numerous code examples you&#8217;ll find through stackoverflow or whatever. I was shocked by the amount of people posting buggy code, for what is actually a relatively simple problem.</p>
<p>I do find it funny that people describe CoreGraphics or Quartz as low level APIs. For a primarily Objective-C coder maybe, but for anyone who has experience with C, it shouldn&#8217;t pose much of a burden. Sure CoreGraphics IS lower level than UIImage, but I&#8217;d still describe it as a fairly &#8220;high level&#8221; API, especially when you compare it to OpenGL.</p>
<p>Anyhow, if your looking to re-size UIImages easily, without having to use CoreGraphics or Quartz, I would strongly recommend checking out Trevor&#8217;s article over here:</p>
<p>http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/</p>
<p>He has written some UIImage categories which will save a lot of time, and more importantly they are well written (and work).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onidev.com/2010/03/11/uiimage-resizing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Approval times improved</title>
		<link>http://www.onidev.com/2010/03/10/approval-times-improved/</link>
		<comments>http://www.onidev.com/2010/03/10/approval-times-improved/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 09:39:52 +0000</pubDate>
		<dc:creator>Mitch</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[approval]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://www.onidev.com/?p=246</guid>
		<description><![CDATA[Since the new year Apple appears to be making massive improvements to their overall approval times. An update for F1 Insider was approved in about 48 &#8211; 72 hours, which we had previously planned for 1 &#8211; 2 weeks!
Very good job, I hope it continues.
Now we just need to get some consistency in the approval/rejection [...]]]></description>
			<content:encoded><![CDATA[<p>Since the new year Apple appears to be making massive improvements to their overall approval times. An update for <a href="http://www.onidev.com/portfolio/f1-insider/">F1 Insider</a> was approved in about 48 &#8211; 72 hours, which we had previously planned for 1 &#8211; 2 weeks!</p>
<p>Very good job, I hope it continues.</p>
<p>Now we just need to get some consistency in the approval/rejection guidelines <img src='http://www.onidev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.onidev.com/2010/03/10/approval-times-improved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The application does not have a valid signature</title>
		<link>http://www.onidev.com/2010/01/12/the-application-does-not-have-a-valid-signature/</link>
		<comments>http://www.onidev.com/2010/01/12/the-application-does-not-have-a-valid-signature/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 12:31:40 +0000</pubDate>
		<dc:creator>Mitch</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.onidev.com/?p=237</guid>
		<description><![CDATA[Had a frustrating issue this weekend with one of my Xcode projects. I&#8217;ve been working with this project for months, without problems, and then suddenly the application won&#8217;t install onto the Simulator, and when ran onto the device, I&#8217;m greeted with the error: &#8220;The application does not have a valid signature.&#8221;
Note this is not the [...]]]></description>
			<content:encoded><![CDATA[<p>Had a frustrating issue this weekend with one of my Xcode projects. I&#8217;ve been working with this project for months, without problems, and then suddenly the application won&#8217;t install onto the Simulator, and when ran onto the device, I&#8217;m greeted with the error: &#8220;The application does not have a valid signature.&#8221;</p>
<p>Note this is not the same as the more common invalid provisioning profile error. I of course, googled my problem with the error message, but to my surprise found very little of anyone else with the same problem.</p>
<p>After a slow process of elimination, I finally tracked down the problem.</p>
<p>In my application, the directory structure of the resource files is very important. Added folders with the default option in Xcode, adds them as a group, and in the resulting application, all the files are copied into the top directory. This creates problems with you have files which share the same name, in different directories.</p>
<p>The solution to this is of course use reference folders (the second option you can select when added files to the project).</p>
<p>This is all fine and dandy, but what caused my Xcode project to go haywire, was the fact that my reference folder was called &#8220;resources&#8221;. The solution, was simply to rename the folder to &#8220;resource&#8221; (or anything else in fact), and after a clean, it works.</p>
<p>Very very strange error, but thankfully with an easy fix, once you know how!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onidev.com/2010/01/12/the-application-does-not-have-a-valid-signature/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Customisable UIPageControl</title>
		<link>http://www.onidev.com/2009/12/02/customisable-uipagecontrol/</link>
		<comments>http://www.onidev.com/2009/12/02/customisable-uipagecontrol/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 14:12:12 +0000</pubDate>
		<dc:creator>Mitch</dc:creator>
				<category><![CDATA[Code Examples]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[OMPageControl]]></category>
		<category><![CDATA[UIKit]]></category>
		<category><![CDATA[UIPageControl]]></category>

		<guid isPermaLink="false">http://www.onidev.com/?p=219</guid>
		<description><![CDATA[The UIPageControl has no way of changing the colors of the dots. Kind of annoying right? Well I knocked up a simple solution to customising the look of the UIPageControl.
This class allows you to replace the dots with your own UIImages, with the following 2 properties:

@property &#40;nonatomic, readwrite, retain&#41; UIImage* imageNormal;
@property &#40;nonatomic, readwrite, retain&#41; UIImage* [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_225" class="wp-caption alignright" style="width: 70px"><img src="http://www.onidev.com/wp-content/uploads/2009/12/OMPageControl.gif" alt="PageControl Examples" title="OMPageControl Examples" width="60" height="120" class="size-full wp-image-225" /><p class="wp-caption-text">PageControl Examples</p></div><br />
The UIPageControl has no way of changing the colors of the dots. Kind of annoying right? Well I knocked up a simple solution to customising the look of the UIPageControl.</p>
<p>This class allows you to replace the dots with your own UIImages, with the following 2 properties:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>nonatomic, readwrite, retain<span style="color: #002200;">&#41;</span> UIImage<span style="color: #002200;">*</span> imageNormal;
<span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>nonatomic, readwrite, retain<span style="color: #002200;">&#41;</span> UIImage<span style="color: #002200;">*</span> imageCurrent;</pre></div></div>

<p>It works by replacing the UIImage on the UIImageView containing the original dot.</p>
<p>One word of warning, if Apple change the way the UIPageControl works, this code will most likely break (especially if they change the dots so they are no longer UIImageViews!). However I&#8217;d say the only reason this would happen, is if they add their own functionality in to customise the look of it, so it&#8217;s probably OK.</p>
<p>Here&#8217;s the full code, in all it&#8217;s glory. Feel free to use how you see fit (I&#8217;m releasing this with no restrictions). It&#8217;s not very complicated, but I figured it might be useful to someone!</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &lt;UIKit/UIKit.h&gt;</span>
&nbsp;
<span style="color: #a61390;">@interface</span> OMPageControl <span style="color: #002200;">:</span> UIPageControl <span style="color: #002200;">&#123;</span>
  UIImage<span style="color: #002200;">*</span> mImageNormal;
  UIImage<span style="color: #002200;">*</span> mImageCurrent;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>nonatomic, readwrite, retain<span style="color: #002200;">&#41;</span> UIImage<span style="color: #002200;">*</span> imageNormal;
<span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>nonatomic, readwrite, retain<span style="color: #002200;">&#41;</span> UIImage<span style="color: #002200;">*</span> imageCurrent;
&nbsp;
<span style="color: #a61390;">@end</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &quot;OMPageControl.h&quot;</span>
&nbsp;
<span style="color: #a61390;">@interface</span> OMPageControl <span style="color: #002200;">&#40;</span>Private<span style="color: #002200;">&#41;</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> updateDots;
<span style="color: #a61390;">@end</span>
&nbsp;
&nbsp;
<span style="color: #a61390;">@implementation</span> OMPageControl
&nbsp;
<span style="color: #a61390;">@synthesize</span> imageNormal <span style="color: #002200;">=</span> mImageNormal;
<span style="color: #a61390;">@synthesize</span> imageCurrent <span style="color: #002200;">=</span> mImageCurrent;
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> dealloc
<span style="color: #002200;">&#123;</span>
  <span style="color: #002200;">&#91;</span>mImageNormal release<span style="color: #002200;">&#93;</span>, mImageNormal <span style="color: #002200;">=</span> <span style="color: #a61390;">nil</span>;
  <span style="color: #002200;">&#91;</span>mImageCurrent release<span style="color: #002200;">&#93;</span>, mImageCurrent <span style="color: #002200;">=</span> <span style="color: #a61390;">nil</span>;
&nbsp;
	<span style="color: #002200;">&#91;</span>super dealloc<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #11740a; font-style: italic;">/** override to update dots */</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> setCurrentPage<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>currentPage
<span style="color: #002200;">&#123;</span>
  <span style="color: #002200;">&#91;</span>super setCurrentPage<span style="color: #002200;">:</span>currentPage<span style="color: #002200;">&#93;</span>;
&nbsp;
  <span style="color: #11740a; font-style: italic;">// update dot views</span>
  <span style="color: #002200;">&#91;</span>self updateDots<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">/** override to update dots */</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> updateCurrentPageDisplay
<span style="color: #002200;">&#123;</span>
  <span style="color: #002200;">&#91;</span>super updateCurrentPageDisplay<span style="color: #002200;">&#93;</span>;
&nbsp;
  <span style="color: #11740a; font-style: italic;">// update dot views</span>
  <span style="color: #002200;">&#91;</span>self updateDots<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">/** Override setImageNormal */</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> setImageNormal<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIImage<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>image
<span style="color: #002200;">&#123;</span>
  <span style="color: #002200;">&#91;</span>mImageNormal release<span style="color: #002200;">&#93;</span>;
  mImageNormal <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>image retain<span style="color: #002200;">&#93;</span>;
&nbsp;
  <span style="color: #11740a; font-style: italic;">// update dot views</span>
  <span style="color: #002200;">&#91;</span>self updateDots<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">/** Override setImageCurrent */</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> setImageCurrent<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIImage<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>image
<span style="color: #002200;">&#123;</span>
  <span style="color: #002200;">&#91;</span>mImageCurrent release<span style="color: #002200;">&#93;</span>;
  mImageCurrent <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>image retain<span style="color: #002200;">&#93;</span>;
&nbsp;
  <span style="color: #11740a; font-style: italic;">// update dot views</span>
  <span style="color: #002200;">&#91;</span>self updateDots<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">/** Override to fix when dots are directly clicked */</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> endTrackingWithTouch<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITouch<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>touch withEvent<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIEvent<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>event 
<span style="color: #002200;">&#123;</span>
  <span style="color: #002200;">&#91;</span>super endTrackingWithTouch<span style="color: #002200;">:</span>touch withEvent<span style="color: #002200;">:</span>event<span style="color: #002200;">&#93;</span>;
&nbsp;
  <span style="color: #002200;">&#91;</span>self updateDots<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #6e371a;">#pragma mark - (Private)</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> updateDots
<span style="color: #002200;">&#123;</span>
  <span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span>mImageCurrent || mImageNormal<span style="color: #002200;">&#41;</span>
  <span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// Get subviews</span>
    <span style="color: #400080;">NSArray</span><span style="color: #002200;">*</span> dotViews <span style="color: #002200;">=</span> self.subviews;
    <span style="color: #a61390;">for</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span> i <span style="color: #002200;">=</span> <span style="color: #2400d9;">0</span>; i &lt; dotViews.count; <span style="color: #002200;">++</span>i<span style="color: #002200;">&#41;</span>
    <span style="color: #002200;">&#123;</span>
      UIImageView<span style="color: #002200;">*</span> dot <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>dotViews objectAtIndex<span style="color: #002200;">:</span>i<span style="color: #002200;">&#93;</span>;
      <span style="color: #11740a; font-style: italic;">// Set image</span>
      dot.image <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span>i <span style="color: #002200;">==</span> self.currentPage<span style="color: #002200;">&#41;</span> ? mImageCurrent <span style="color: #002200;">:</span> mImageNormal;
    <span style="color: #002200;">&#125;</span>
  <span style="color: #002200;">&#125;</span>
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #a61390;">@end</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.onidev.com/2009/12/02/customisable-uipagecontrol/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>
