<?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>Notes of a Developer &#187; UINavigationBar</title>
	<atom:link href="http://www.developers-life.com/tag/uinavigationbar/feed" rel="self" type="application/rss+xml" />
	<link>http://www.developers-life.com</link>
	<description>Develop on Objective-C, UIKit, C, OpenGL for  iPhone, iPad, Mac OS X</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:49:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Custom UINavigationBar with image and back button</title>
		<link>http://www.developers-life.com/custom-uinavigationbar-with-image-and-back-button.html</link>
		<comments>http://www.developers-life.com/custom-uinavigationbar-with-image-and-back-button.html#comments</comments>
		<pubDate>Tue, 09 Feb 2010 19:10:16 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[UIKit]]></category>
		<category><![CDATA[UINavigationBar]]></category>
		<category><![CDATA[Кодинг]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=877</guid>
		<description><![CDATA[Many people could not find this solution! It&#8217;s really very simple solution and it does not contain any private methods and functions. It&#8217;s based on the drawRect method and the simple manipulation with the title. If the title is specified, then the text of title displays, but if not, then displays the image. 1234567891011121314151617181920212223242526272829@implementation UINavigationBar [...]]]></description>
			<content:encoded><![CDATA[<p>  Many people could not find this solution! It&#8217;s really very simple solution  and it does not contain any private methods and functions. It&#8217;s based on the drawRect method and the simple manipulation with the title. If the title is specified, then the text of title displays, but if not, then displays the image.<br />
<span id="more-877"></span></p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #a61390;">@implementation</span> UINavigationBar <span style="color: #002200;">&#40;</span>UINavigationBarCustomDraw<span style="color: #002200;">&#41;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> drawRect<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>CGRect<span style="color: #002200;">&#41;</span>rect <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>self setTintColor<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>UIColor colorWithRed<span style="color: #002200;">:</span>0.5f<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; green<span style="color: #002200;">:</span> 0.5f<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; blue<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alpha<span style="color: #002200;">:</span><span style="color: #2400d9;">1</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>self.topItem.title length<span style="color: #002200;">&#93;</span> &gt; <span style="color: #2400d9;">0</span> <span style="color: #002200;">&amp;&amp;</span> <span style="color: #002200;">!</span><span style="color: #002200;">&#91;</span>self.topItem.title isEqualToString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Back to ...&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIImage imageNamed<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Header_1px.png&quot;</span><span style="color: #002200;">&#93;</span> drawInRect<span style="color: #002200;">:</span>rect<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CGRect frame <span style="color: #002200;">=</span> CGRectMake<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">320</span>, <span style="color: #2400d9;">44</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UILabel <span style="color: #002200;">*</span>label <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UILabel alloc<span style="color: #002200;">&#93;</span> initWithFrame<span style="color: #002200;">:</span>frame<span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>label setBackgroundColor<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>UIColor clearColor<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label.font <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIFont boldSystemFontOfSize<span style="color: #002200;">:</span> <span style="color: #2400d9;">20.0</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label.shadowColor <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIColor colorWithWhite<span style="color: #002200;">:</span><span style="color: #2400d9;">0.0</span> alpha<span style="color: #002200;">:</span><span style="color: #2400d9;">1</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label.textAlignment <span style="color: #002200;">=</span> UITextAlignmentCenter;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label.textColor <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIColor whiteColor<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label.text <span style="color: #002200;">=</span> self.topItem.title;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.topItem.titleView <span style="color: #002200;">=</span> label;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span> <span style="color: #a61390;">else</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIImage imageNamed<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Header.png&quot;</span><span style="color: #002200;">&#93;</span> drawInRect<span style="color: #002200;">:</span>rect<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self.topItem.titleView <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIView alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span><br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #a61390;">@end</span></div></td></tr></tbody></table></div>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/HJKUIFfOThI&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/HJKUIFfOThI&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p><a href="http://www.developers-life.com/wp-content/plugins/download_counter/redirect.php?id=8" target="_blank"><img src="http://www.developers-life.com/wp-content/plugins/download_counter/redirect.php?pid=8" border="0" alt="" />source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/custom-uinavigationbar-with-image-and-back-button.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Customizing UINavigationBar</title>
		<link>http://www.developers-life.com/customizing-uinavigationbar.html</link>
		<comments>http://www.developers-life.com/customizing-uinavigationbar.html#comments</comments>
		<pubDate>Wed, 09 Dec 2009 09:22:43 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[UIKit]]></category>
		<category><![CDATA[UINavigationBar]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=692</guid>
		<description><![CDATA[Change color for UINavigationBar 1&#91;&#91;controller navigationBar&#93; setTintColor:&#91;UIColor colorWithRed:0.36 green:0.09 blue:0.39 alpha:1.00&#93;&#93;; Set custom title for UINavigationBar 123456789CGRect frame = CGRectMake&#40;0, 0, 400, 44&#41;; &#160; &#160; &#160; &#160; &#160; UILabel *label = &#91;&#91;&#91;UILabel alloc&#93; initWithFrame:frame&#93; autorelease&#93;; &#160; &#160; &#160; &#160; &#160; label.backgroundColor = &#91;UIColor clearColor&#93;; &#160; &#160; &#160; &#160; &#160; label.font = &#91;UIFont boldSystemFontOfSize:20.0&#93;; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Change color for UINavigationBar</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>controller navigationBar<span style="color: #002200;">&#93;</span> setTintColor<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>UIColor colorWithRed<span style="color: #002200;">:</span><span style="color: #2400d9;">0.36</span> green<span style="color: #002200;">:</span><span style="color: #2400d9;">0.09</span> blue<span style="color: #002200;">:</span><span style="color: #2400d9;">0.39</span> alpha<span style="color: #002200;">:</span><span style="color: #2400d9;">1.00</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;</div></td></tr></tbody></table></div>
<p>Set custom title for UINavigationBar</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">CGRect frame <span style="color: #002200;">=</span> CGRectMake<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">400</span>, <span style="color: #2400d9;">44</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UILabel <span style="color: #002200;">*</span>label <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UILabel alloc<span style="color: #002200;">&#93;</span> initWithFrame<span style="color: #002200;">:</span>frame<span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label.backgroundColor <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIColor clearColor<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label.font <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIFont boldSystemFontOfSize<span style="color: #002200;">:</span><span style="color: #2400d9;">20.0</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label.shadowColor <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIColor colorWithWhite<span style="color: #002200;">:</span><span style="color: #2400d9;">0.0</span> alpha<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label.textAlignment <span style="color: #002200;">=</span> UITextAlignmentCenter;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label.textColor <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIColor blackColor<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label.text <span style="color: #002200;">=</span> navBar.topItem.title;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; navBar.topItem.titleView <span style="color: #002200;">=</span> label;</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/customizing-uinavigationbar.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

