document.open();document.writeln('<div onmouseover="document.getElementById(\'snipt-15418\').style.display = \'block\'; return false;" onmouseout="document.getElementById(\'snipt-15418\').style.display = \'none\'; return false;" style="position: relative;">');document.writeln('<div class="highlight" style="background: #202020"><pre style="-moz-border-radius: 5px; border-radius: 5px; -webkit-border-radius: 5px; margin: 0; display: block; font: 11px Monaco, monospace !important; padding: 15px; background-color: #1C1C1C; overflow: auto; color: #D0D0D0;; line-height: 125%"><span style="color: #cd2828; font-weight: normal">#import &lt;UIKit/UIKit.h&gt;</span>');document.writeln('');document.writeln('<span style="color: #6ab825; font-weight: normal">@interface</span> <span style="color: #447fcf; text-decoration: underline">RootViewController</span> : <span style="color: #447fcf; text-decoration: underline">UITableViewController</span> <span style="color: #d0d0d0">{</span>');document.writeln('');document.writeln('	<span style="color: #d0d0d0">NSMutableArray</span> <span style="color: #d0d0d0">*listOfItems;</span>');document.writeln('<span style="color: #d0d0d0">}</span>');document.writeln('');document.writeln('<span style="color: #6ab825; font-weight: normal">@end</span>');document.writeln('');document.writeln('<span style="color: #999999; font-style: italic">//viewDidLoad method declared in RootViewController.m</span>');document.writeln('<span style="color: #d0d0d0">-</span> <span style="color: #d0d0d0">(</span><span style="color: #6ab825; font-weight: normal">void</span><span style="color: #d0d0d0">)viewDidLoad</span> <span style="color: #d0d0d0">{</span>');document.writeln('	<span style="color: #d0d0d0">[super</span> <span style="color: #d0d0d0">viewDidLoad];</span>');document.writeln('');document.writeln('	<span style="color: #999999; font-style: italic">//Initialize the array.</span>');document.writeln('	<span style="color: #d0d0d0">listOfItems</span> <span style="color: #d0d0d0">=</span> <span style="color: #d0d0d0">[[NSMutableArray</span> <span style="color: #d0d0d0">alloc]</span> <span style="color: #d0d0d0">init];</span>');document.writeln('');document.writeln('	<span style="color: #999999; font-style: italic">//Add items</span>');document.writeln('	<span style="color: #d0d0d0">[listOfItems</span> <span style="color: #d0d0d0">addObject:</span><span style="color: #ed9d13">@&quot;Iceland&quot;</span><span style="color: #d0d0d0">];</span>');document.writeln('	<span style="color: #d0d0d0">[listOfItems</span> <span style="color: #d0d0d0">addObject:</span><span style="color: #ed9d13">@&quot;Greenland&quot;</span><span style="color: #d0d0d0">];</span>');document.writeln('	<span style="color: #d0d0d0">[listOfItems</span> <span style="color: #d0d0d0">addObject:</span><span style="color: #ed9d13">@&quot;Switzerland&quot;</span><span style="color: #d0d0d0">];</span>');document.writeln('	<span style="color: #d0d0d0">[listOfItems</span> <span style="color: #d0d0d0">addObject:</span><span style="color: #ed9d13">@&quot;Norway&quot;</span><span style="color: #d0d0d0">];</span>');document.writeln('	<span style="color: #d0d0d0">[listOfItems</span> <span style="color: #d0d0d0">addObject:</span><span style="color: #ed9d13">@&quot;New Zealand&quot;</span><span style="color: #d0d0d0">];</span>');document.writeln('	<span style="color: #d0d0d0">[listOfItems</span> <span style="color: #d0d0d0">addObject:</span><span style="color: #ed9d13">@&quot;Greece&quot;</span><span style="color: #d0d0d0">];</span>');document.writeln('	<span style="color: #d0d0d0">[listOfItems</span> <span style="color: #d0d0d0">addObject:</span><span style="color: #ed9d13">@&quot;Rome&quot;</span><span style="color: #d0d0d0">];</span>');document.writeln('	<span style="color: #d0d0d0">[listOfItems</span> <span style="color: #d0d0d0">addObject:</span><span style="color: #ed9d13">@&quot;Ireland&quot;</span><span style="color: #d0d0d0">];</span>');document.writeln('');document.writeln('	<span style="color: #999999; font-style: italic">//Set the title</span>');document.writeln('	<span style="color: #d0d0d0">self.navigationItem.title</span> <span style="color: #d0d0d0">=</span> <span style="color: #ed9d13">@&quot;Countries&quot;</span><span style="color: #d0d0d0">;</span>');document.writeln('<span style="color: #d0d0d0">}</span>');document.writeln('');document.writeln('<span style="color: #999999; font-style: italic">//dealloc method declared in RootViewController.m</span>');document.writeln('<span style="color: #d0d0d0">-</span> <span style="color: #d0d0d0">(</span><span style="color: #6ab825; font-weight: normal">void</span><span style="color: #d0d0d0">)dealloc</span> <span style="color: #d0d0d0">{</span>');document.writeln('');document.writeln('	<span style="color: #d0d0d0">[listOfItems</span> <span style="color: #d0d0d0">release];</span>');document.writeln('	<span style="color: #d0d0d0">[super</span> <span style="color: #d0d0d0">dealloc];</span>');document.writeln('<span style="color: #d0d0d0">}</span>');document.writeln('</pre></div>');document.writeln('');document.writeln('<div style="background-color: #111; color: #D0D0D0; float: right; padding: 5px 10px; -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; font: 11px Arial,Sans-Serif; display: none; position: absolute; bottom: 0; right: 0;" id="snipt-15418">code hosted by <a href="http://snipt.net/jsveron23/ch1-1?key=4b75194521a1adc64ec3e1e238646654" style="color: #0084FF; text-decoration: none;">snipt.net</a></div>');document.writeln('</div>');document.close();