<?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>Tewha &#187; UINavigationController</title>
	<atom:link href="http://tewha.net/tag/uinavigationcontroller/feed/" rel="self" type="application/rss+xml" />
	<link>http://tewha.net</link>
	<description>Writings and links on iPhone and iPad programming</description>
	<lastBuildDate>Sat, 04 Feb 2012 06:19:59 +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>Changing UINavigationBar&#8217;s title text color</title>
		<link>http://tewha.net/2010/10/changing-uinavigationbars-title-text-color/</link>
		<comments>http://tewha.net/2010/10/changing-uinavigationbars-title-text-color/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 18:17:29 +0000</pubDate>
		<dc:creator>Steven Fisher</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[iOS Development]]></category>
		<category><![CDATA[UINavigationController]]></category>

		<guid isPermaLink="false">http://tewha.net/?p=1138</guid>
		<description><![CDATA[You can&#8217;t, directly, but you can substitute your own view. For example, start with Apple&#8217;s NavBar sample. Drop this code into initWithNibName:bundle: in PageThreeViewController.m: ? - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // this will &#8230; <a href="http://tewha.net/2010/10/changing-uinavigationbars-title-text-color/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You can&#8217;t, directly, but you can substitute your own view.</p>

<p>For example, start with <a href="http://developer.apple.com/library/ios/#samplecode/NavBar/Introduction/Intro.html">Apple&#8217;s NavBar sample</a>.  Drop this code into <code>initWithNibName:bundle:</code> in <code>PageThreeViewController.m</code>:</p>

<div class="highlight-wrapper objc">
<div class="tools">
<div class="wrap">
<a href="#" class="about">?</a><div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<pre class="raw"><code lang="objc">
- (id)initWithNibName:(NSString *)nibNameOrNil
               bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self)
    {
        // this will appear as the title in the navigation bar
        CGRect frame = CGRectMake(0, 0, 400, 44);
        UILabel *label = [[UILabel alloc] initWithFrame:frame];
        label.backgroundColor = [UIColor clearColor];
        label.font = [UIFont boldSystemFontOfSize:20.0];
        label.shadowColor = [UIColor colorWithWhite:0.0 alpha:0.5];
        label.textAlignment = UITextAlignmentCenter;
        label.textColor = [UIColor yellowColor];
        self.navigationItem.titleView = label;
        label.text = NSLocalizedString(@"PageThreeTitle", @"");
        [label release];
    }

    return self;
}
</code></pre>
<div class="highlighted"><table class="highlighttable"><tr>
<td class="linenos"><div class="linenodiv"><pre class="nl"> 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21</pre></div></td>
<td class="code">
<div class="highlight"><pre><span class="o">-</span> <span class="p">(</span><span class="kt">id</span><span class="p">)</span><span class="nl">initWithNibName:</span><span class="p">(</span><span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="n">nibNameOrNil</span>
               <span class="nl">bundle:</span><span class="p">(</span><span class="n">NSBundle</span> <span class="o">*</span><span class="p">)</span><span class="n">nibBundleOrNil</span>
<span class="p">{</span>
    <span class="n">self</span> <span class="o">=</span> <span class="p">[</span><span class="n">super</span> <span class="nl">initWithNibName:</span><span class="n">nibNameOrNil</span> <span class="nl">bundle:</span><span class="n">nibBundleOrNil</span><span class="p">];</span>
    <span class="k">if</span> <span class="p">(</span><span class="n">self</span><span class="p">)</span>
    <span class="p">{</span>
        <span class="c1">// this will appear as the title in the navigation bar</span>
        <span class="n">CGRect</span> <span class="n">frame</span> <span class="o">=</span> <span class="n">CGRectMake</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">400</span><span class="p">,</span> <span class="mi">44</span><span class="p">);</span>
        <span class="n">UILabel</span> <span class="o">*</span><span class="n">label</span> <span class="o">=</span> <span class="p">[[</span><span class="n">UILabel</span> <span class="n">alloc</span><span class="p">]</span> <span class="nl">initWithFrame:</span><span class="n">frame</span><span class="p">];</span>
        <span class="n">label</span><span class="p">.</span><span class="n">backgroundColor</span> <span class="o">=</span> <span class="p">[</span><span class="n">UIColor</span> <span class="n">clearColor</span><span class="p">];</span>
        <span class="n">label</span><span class="p">.</span><span class="n">font</span> <span class="o">=</span> <span class="p">[</span><span class="n">UIFont</span> <span class="nl">boldSystemFontOfSize:</span><span class="mf">20.0</span><span class="p">];</span>
        <span class="n">label</span><span class="p">.</span><span class="n">shadowColor</span> <span class="o">=</span> <span class="p">[</span><span class="n">UIColor</span> <span class="nl">colorWithWhite:</span><span class="mf">0.0</span> <span class="nl">alpha:</span><span class="mf">0.5</span><span class="p">];</span>
        <span class="n">label</span><span class="p">.</span><span class="n">textAlignment</span> <span class="o">=</span> <span class="n">UITextAlignmentCenter</span><span class="p">;</span>
        <span class="n">label</span><span class="p">.</span><span class="n">textColor</span> <span class="o">=</span> <span class="p">[</span><span class="n">UIColor</span> <span class="n">yellowColor</span><span class="p">];</span>
        <span class="n">self</span><span class="p">.</span><span class="n">navigationItem</span><span class="p">.</span><span class="n">titleView</span> <span class="o">=</span> <span class="n">label</span><span class="p">;</span>
        <span class="n">label</span><span class="p">.</span><span class="n">text</span> <span class="o">=</span> <span class="n">NSLocalizedString</span><span class="p">(</span><span class="s">@"PageThreeTitle"</span><span class="p">,</span> <span class="s">@""</span><span class="p">);</span>
        <span class="p">[</span><span class="n">label</span> <span class="n">release</span><span class="p">];</span>
    <span class="p">}</span>

    <span class="k">return</span> <span class="n">self</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</td>
</tr></table></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://tewha.net/2010/10/changing-uinavigationbars-title-text-color/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Die you damn, dirty tab bar</title>
		<link>http://tewha.net/2009/07/die-you-damn-dirty-tab-bar/</link>
		<comments>http://tewha.net/2009/07/die-you-damn-dirty-tab-bar/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 03:14:20 +0000</pubDate>
		<dc:creator>Steven Fisher</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Cocoa Touch]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[UINavigationController]]></category>
		<category><![CDATA[UITabBar]]></category>

		<guid isPermaLink="false">http://tewha.net/?p=877</guid>
		<description><![CDATA[Justin Williams: Die you damn, dirty tab bar.]]></description>
			<content:encoded><![CDATA[<p>Justin Williams: <a href="http://carpeaqua.com/2009/07/08/die-you-damn-dirty-tab-bar/">Die you damn, dirty tab bar</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tewha.net/2009/07/die-you-damn-dirty-tab-bar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: tewha.net @ 2012-02-07 00:05:41 -->
