<?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>de &#187; uitabbar</title>
	<atom:link href="http://duivesteyn.net/tag/uitabbar/feed/" rel="self" type="application/rss+xml" />
	<link>http://duivesteyn.net</link>
	<description></description>
	<lastBuildDate>Tue, 20 Apr 2010 22:00:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>iPhone TabBar Custom Background Image</title>
		<link>http://duivesteyn.net/2010/01/16/iphone-custom-tabbar-background-image/</link>
		<comments>http://duivesteyn.net/2010/01/16/iphone-custom-tabbar-background-image/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 16:25:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iPhone SDK Tips]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[uitabbar]]></category>

		<guid isPermaLink="false">http://duivesteyn.net/?p=54</guid>
		<description><![CDATA[I have spent a bit of time implementing a background image behind my TabBar in an iPhone App. I used a combination of internet tutorials and so I have posted my own variant. Step 1: Create a new class named CustomUITabBarController. Step 2: Insert the following code CustomUITabBarController.h // CustomUITabBarController.h #import &#38;lt;UIKit/UIKit.h&#38;gt; @interface CustomUITabBarController: UITabBarController { [...]]]></description>
			<content:encoded><![CDATA[<p>I have spent a bit of time implementing a background image behind my TabBar in an iPhone App. I used a combination of internet tutorials and so I have posted my own variant.</p>
<p><strong>Step 1: </strong></p>
<p><strong> </strong>Create a new class named CustomUITabBarController.</p>
<p><a href="http://duivesteyn.net/wp-content/uploads/2010/01/uitabbar-ss1.png" rel="lightbox[54]"><img class="alignnone size-full wp-image-57" title="uitabbar-ss1" src="http://duivesteyn.net/wp-content/uploads/2010/01/uitabbar-ss1.png" alt="" width="186" height="37" /></a><span id="more-54"></span></p>
<p><strong>Step 2: </strong></p>
<p>Insert the following code</p>
<p><strong> CustomUITabBarController.h </strong></p>
<p><code>// CustomUITabBarController.h<br />
#import &amp;lt;UIKit/UIKit.h&amp;gt;<br />
@interface CustomUITabBarController: UITabBarController {<br />
IBOutlet UITabBar *tabBar1;<br />
}<br />
@property(nonatomic, retain) UITabBar *tabBar1;<br />
@end</code></p>
<p><strong>CustomUITabBarController.m</strong></p>
<p><code>// CustomUITabBarController.m<br />
#import "CustomUITabBarController.h"<br />
@implementation CustomUITabBarController<br />
@synthesize tabBar1;<br />
- (void)viewDidLoad {<br />
[super viewDidLoad];<br />
UIImageView *img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"NavBar.png"]];<br />
img.frame = CGRectOffset(img.frame, 0, 1);<br />
[tabBar1 insertSubview:img atIndex:0];<br />
[img release];<br />
}<br />
@end</code><br />
<strong>Step 3:</strong></p>
<p>In Interface Builder, link up the newly created outlet &#8216;tabbar1&#8242; to the pre-existing tab bar.</p>
<p><a href="http://duivesteyn.net/wp-content/uploads/2010/01/Screen-shot-2010-01-16-at-5.16.16-PM.png" rel="lightbox[54]"><img class="alignnone size-full wp-image-55" title="Screen shot 2010-01-16 at 5.16.16 PM" src="http://duivesteyn.net/wp-content/uploads/2010/01/Screen-shot-2010-01-16-at-5.16.16-PM.png" alt="" width="285" height="86" /></a></p>
<p><strong>Step 4:</strong></p>
<p>Add a background file NavBar.png to your project resources.</p>
<p><a href="http://duivesteyn.net/wp-content/uploads/2010/01/uitabbar-ss2.png" rel="lightbox[54]"><img class="alignnone size-full wp-image-56" title="uitabbar-ss2" src="http://duivesteyn.net/wp-content/uploads/2010/01/uitabbar-ss2.png" alt="" width="271" height="51" /></a></p>
<p>And thats it!</p>
<p><strong>Downloads:</strong></p>
<p><strong><a href="http://duivesteyn.net/wp-content/uploads/2010/01/uitabbar-ss0.png" rel="lightbox[54]"><img class="alignnone size-full wp-image-60" title="uitabbar-ss0" src="http://duivesteyn.net/wp-content/uploads/2010/01/uitabbar-ss0.png" alt="" width="294" height="40" /></a></strong></p>
<ul>
<li><a href="http://duivesteyn.net/wp-content/uploads/2010/01/CustomUITabBarController.zip">CustomUITabBarController</a></li>
</ul>
<p><strong>References:</strong></p>
<ul>
<li><a href="http://stackoverflow.com/questions/675433/custom-colors-in-uitabbar">http://stackoverflow.com/questions/675433/custom-colors-in-uitabbar</a></li>
<li><a href="http://silentmac.com/?p=386">http://silentmac.com/?p=386</a></li>
</ul>
<p><strong>UITabBar Backgrounds</strong></p>
<p>Here are some TabBars I have quickly put together. These are free for use and adaption.</p>
<p><a href="http://duivesteyn.net/wp-content/uploads/2010/01/UITabBar1.png" rel="lightbox[54]"><img class="alignnone size-full wp-image-97" title="UITabBar1" src="http://duivesteyn.net/wp-content/uploads/2010/01/UITabBar1.png" alt="" width="320" height="63" /></a></p>
<p><a href="http://duivesteyn.net/wp-content/uploads/2010/01/UITabBar2.png" rel="lightbox[54]"><img class="alignnone size-full wp-image-98" title="UITabBar2" src="http://duivesteyn.net/wp-content/uploads/2010/01/UITabBar2.png" alt="" width="320" height="63" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://duivesteyn.net/2010/01/16/iphone-custom-tabbar-background-image/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
