<?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: Customisable UIPageControl</title>
	<atom:link href="http://www.onidev.com/2009/12/02/customisable-uipagecontrol/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.onidev.com/2009/12/02/customisable-uipagecontrol/</link>
	<description>excellence in app design &#38; development</description>
	<lastBuildDate>Mon, 06 Feb 2012 09:02:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Increasing thr UIPageControl Size in iOS</title>
		<link>http://www.onidev.com/2009/12/02/customisable-uipagecontrol/comment-page-1/#comment-6891</link>
		<dc:creator>Increasing thr UIPageControl Size in iOS</dc:creator>
		<pubDate>Mon, 16 Jan 2012 06:55:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.onidev.com/?p=219#comment-6891</guid>
		<description>[...] Hi I want to incease the size of UIPAgeControl on iOS&#8230; on google i&#8217;ve found this http://www.onidev.com/2009/12/02/customisable-uipagecontrol/ [...]</description>
		<content:encoded><![CDATA[<p>[...] Hi I want to incease the size of UIPAgeControl on iOS&#8230; on google i&#8217;ve found this <a href="http://www.onidev.com/2009/12/02/customisable-uipagecontrol/" rel="nofollow">http://www.onidev.com/2009/12/02/customisable-uipagecontrol/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duncan</title>
		<link>http://www.onidev.com/2009/12/02/customisable-uipagecontrol/comment-page-1/#comment-4817</link>
		<dc:creator>Duncan</dc:creator>
		<pubDate>Tue, 15 Nov 2011 23:25:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.onidev.com/?p=219#comment-4817</guid>
		<description>Thanks for the code, works great but I have a question regarding the pagecontrol frame size ( not the dots ). I&#039;ve set the frame height width and height, width seems to be OK, but height seems to be far to big. Is this to do with possibly my dot images, a bug or something else?</description>
		<content:encoded><![CDATA[<p>Thanks for the code, works great but I have a question regarding the pagecontrol frame size ( not the dots ). I&#8217;ve set the frame height width and height, width seems to be OK, but height seems to be far to big. Is this to do with possibly my dot images, a bug or something else?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hugo</title>
		<link>http://www.onidev.com/2009/12/02/customisable-uipagecontrol/comment-page-1/#comment-1960</link>
		<dc:creator>hugo</dc:creator>
		<pubDate>Mon, 16 May 2011 20:39:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.onidev.com/?p=219#comment-1960</guid>
		<description>im trying to change images for smaller ones and also change the spacing, but it works only after first page change...</description>
		<content:encoded><![CDATA[<p>im trying to change images for smaller ones and also change the spacing, but it works only after first page change&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hennes</title>
		<link>http://www.onidev.com/2009/12/02/customisable-uipagecontrol/comment-page-1/#comment-1623</link>
		<dc:creator>hennes</dc:creator>
		<pubDate>Tue, 12 Apr 2011 15:56:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.onidev.com/?p=219#comment-1623</guid>
		<description>Works like a charm here. Thanks!! :)</description>
		<content:encoded><![CDATA[<p>Works like a charm here. Thanks!! <img src='http://www.onidev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony Picciano</title>
		<link>http://www.onidev.com/2009/12/02/customisable-uipagecontrol/comment-page-1/#comment-1132</link>
		<dc:creator>Anthony Picciano</dc:creator>
		<pubDate>Thu, 03 Mar 2011 23:19:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.onidev.com/?p=219#comment-1132</guid>
		<description>Thanks!

I ended up adding a couple things to fix the sizing when using larger dots, or in my case, 12x12 boxes.

/** Override to fix calculation of optimal size */
- (CGSize)sizeForNumberOfPages:(NSInteger)pageCount {
	CGSize size = CGSizeMake((mImageCurrent.size.width * pageCount) + (10.0f * (pageCount - 1)), 36.0f);
	return size;
}

#pragma mark - (Private)

- (void) updateDots
{
	if(mImageCurrent &#124;&#124; mImageNormal)
	{
		// Get subviews
		NSArray* dotViews = self.subviews;
		for(int i = 0; i &lt; dotViews.count; ++i)
		{
			UIImageView* dot = [dotViews objectAtIndex:i];
			// Set image
			dot.image = (i == self.currentPage) ? mImageCurrent : mImageNormal;
			dot.frame = CGRectMake(dot.frame.origin.x, dot.frame.origin.y, mImageNormal.size.width, mImageNormal.size.height);
		}
	}
	
	CGSize size = [self sizeForNumberOfPages:self.numberOfPages];
	self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, size.width, size.height);
}</description>
		<content:encoded><![CDATA[<p>Thanks!</p>
<p>I ended up adding a couple things to fix the sizing when using larger dots, or in my case, 12&#215;12 boxes.</p>
<p>/** Override to fix calculation of optimal size */<br />
- (CGSize)sizeForNumberOfPages:(NSInteger)pageCount {<br />
	CGSize size = CGSizeMake((mImageCurrent.size.width * pageCount) + (10.0f * (pageCount &#8211; 1)), 36.0f);<br />
	return size;<br />
}</p>
<p>#pragma mark &#8211; (Private)</p>
<p>- (void) updateDots<br />
{<br />
	if(mImageCurrent || mImageNormal)<br />
	{<br />
		// Get subviews<br />
		NSArray* dotViews = self.subviews;<br />
		for(int i = 0; i &lt; dotViews.count; ++i)<br />
		{<br />
			UIImageView* dot = [dotViews objectAtIndex:i];<br />
			// Set image<br />
			dot.image = (i == self.currentPage) ? mImageCurrent : mImageNormal;<br />
			dot.frame = CGRectMake(dot.frame.origin.x, dot.frame.origin.y, mImageNormal.size.width, mImageNormal.size.height);<br />
		}<br />
	}</p>
<p>	CGSize size = [self sizeForNumberOfPages:self.numberOfPages];<br />
	self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, size.width, size.height);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ju</title>
		<link>http://www.onidev.com/2009/12/02/customisable-uipagecontrol/comment-page-1/#comment-1126</link>
		<dc:creator>Ju</dc:creator>
		<pubDate>Thu, 03 Mar 2011 13:41:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.onidev.com/?p=219#comment-1126</guid>
		<description>Thanks a lot !

You save me some time with this piece of code :)</description>
		<content:encoded><![CDATA[<p>Thanks a lot !</p>
<p>You save me some time with this piece of code <img src='http://www.onidev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: renuga</title>
		<link>http://www.onidev.com/2009/12/02/customisable-uipagecontrol/comment-page-1/#comment-688</link>
		<dc:creator>renuga</dc:creator>
		<pubDate>Thu, 06 Jan 2011 09:44:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.onidev.com/?p=219#comment-688</guid>
		<description>where the images should be add?how to show the customized images as page control(dot)images</description>
		<content:encoded><![CDATA[<p>where the images should be add?how to show the customized images as page control(dot)images</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: renuga</title>
		<link>http://www.onidev.com/2009/12/02/customisable-uipagecontrol/comment-page-1/#comment-687</link>
		<dc:creator>renuga</dc:creator>
		<pubDate>Thu, 06 Jan 2011 08:11:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.onidev.com/?p=219#comment-687</guid>
		<description>Where do the dot images go?I don&#039;t know where you are adding the dot images(mimageNormal , mimageCurrent)
All are done programmatically (or)do anything with interface</description>
		<content:encoded><![CDATA[<p>Where do the dot images go?I don&#8217;t know where you are adding the dot images(mimageNormal , mimageCurrent)<br />
All are done programmatically (or)do anything with interface</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JB</title>
		<link>http://www.onidev.com/2009/12/02/customisable-uipagecontrol/comment-page-1/#comment-592</link>
		<dc:creator>JB</dc:creator>
		<pubDate>Wed, 22 Dec 2010 18:04:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.onidev.com/?p=219#comment-592</guid>
		<description>wow great job, thanks</description>
		<content:encoded><![CDATA[<p>wow great job, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Esteban Torres</title>
		<link>http://www.onidev.com/2009/12/02/customisable-uipagecontrol/comment-page-1/#comment-428</link>
		<dc:creator>Esteban Torres</dc:creator>
		<pubDate>Thu, 11 Nov 2010 15:09:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.onidev.com/?p=219#comment-428</guid>
		<description>I&#039;ve been looking for something like this for quite some time; I make it work but with some problems.

First time the first dot is just a white dot, the rest of the dots are loaded with their corresponding images.

Also; the images that I&#039;m adding are getting colored by the &quot;background&quot; color of the Page Control, if I set the background color to red then the new images get a red tinted looking, like a layer is on top of them with a little opacity.

Anyone having the same issues as me?

Thanks for the code.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been looking for something like this for quite some time; I make it work but with some problems.</p>
<p>First time the first dot is just a white dot, the rest of the dots are loaded with their corresponding images.</p>
<p>Also; the images that I&#8217;m adding are getting colored by the &#8220;background&#8221; color of the Page Control, if I set the background color to red then the new images get a red tinted looking, like a layer is on top of them with a little opacity.</p>
<p>Anyone having the same issues as me?</p>
<p>Thanks for the code.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

