<?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>Fast Chicken &#187; MonoTouch</title>
	<atom:link href="http://www.fastchicken.co.nz/category/monotouch/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fastchicken.co.nz</link>
	<description>MobileAgent for FreeAgent, London&#039;s Nearest Bus and other lovely iPhone apps</description>
	<lastBuildDate>Thu, 26 Jan 2012 12:23:40 +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>London Bike App source code now available</title>
		<link>http://www.fastchicken.co.nz/2011/11/02/london-bike-app-source-code-now-available/</link>
		<comments>http://www.fastchicken.co.nz/2011/11/02/london-bike-app-source-code-now-available/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 21:05:31 +0000</pubDate>
		<dc:creator>nicwise</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.fastchicken.co.nz/?p=1836</guid>
		<description><![CDATA[Recently, on the MonoTouch list, there have been a lot of questions around things which, for me, are fairly basic, including UITabController MonoTouch.Dialog and UITableViews Location awareness GC issues I thought a good way to try to help people would be to release a full, working app, which illustrates this. Hence London Bike App. London Bike App is a fully working application, ...]]></description>
			<content:encoded><![CDATA[<p>Recently, on the <a href="http://ios.xamarin.com/community">MonoTouch list</a>, there have been a lot of questions around things which, for me, are fairly basic, including</p>
<ul>
<li>UITabController</li>
<li>MonoTouch.Dialog and UITableViews</li>
<li>Location awareness</li>
<li>GC issues</li>
</ul>
<p>I thought a good way to try to help people would be to release a full, working app, which illustrates this. Hence <a href="https://github.com/nicwise/londonbikeapp">London Bike App</a>.</p>
<p><a href="/londonbikeapp">London Bike App</a> is a fully working application, with a few minor changes:</p>
<ul>
<li>I&#8217;ve removed the web service calls, as they call into an AppEngine instance, and it is possible to hit it enough to either bring it down (well, stop it working), or cost me money. It now hits static files of the same format.</li>
<li>I&#8217;ve removed my developer keys for <a href="http://cloudmade.com/">cloudmade</a> and <a href="http://www.cyclestreets.net/">cyclestreets</a>, however both offer the keys for free.</li>
<li>I&#8217;ve removed the Retina quality images, as they are part of the <a href="http://glyphish.com/">Glyphish</a> set, which is paid for. It DOES include the Creative-Commons licensed standard resolution versions.</li>
</ul>
<p>You can use it for whatever you like (under the same MIT X11 license that Mono uses), however you cannot make an application which competes directly with London Bike App. you can make one for Paris, or reuse any of the code for your own app, just don&#8217;t recompile it and release it.</p>
<p>Enjoy &#8211; and please comment here, or post on the <a href="http://ios.xamarin.com/community">MonoTouch forums/mailing list</a>, and ask any questions.</p>
<p>And if you want, feel free to look at / buy my other apps, all of which are done with MonoTouch:</p>
<ul>
<li><a href="/nearestbus">Nearest Bus</a> (useful if you are in London)</li>
<li><a href="/tripwallet">Trip Wallet</a></li>
<li><a href="/mobileagent">mobileAgent</a> (good if you are a use of FreeAgent)</li>
</ul>
<p>Sadly, it&#8217;s not quite as advanced as <a href="http://www.ubergizmo.com/2011/11/doom-3-engine-ready-for-open-source-action/">another certain little thing which has source coming shortly</a>, but we can&#8217;t all be <a href="https://twitter.com/#!/ID_AA_Carmack/statuses/131043043469041665">@ID_AA_Carmack</a></p>
<p>And if you are wondering what MonoTouch is, and why it&#8217;s cool, <a href="http://www.fastchicken.co.nz/2011/09/15/c-its-just-not-portable/">have a read of this</a> (esp if you are a C# developer)</p>
<p><a href="https://github.com/nicwise/londonbikeapp">Get it on GitHub</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fastchicken.co.nz/2011/11/02/london-bike-app-source-code-now-available/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nearest Bus, my latest iPhone app, is out.</title>
		<link>http://www.fastchicken.co.nz/2011/10/07/nearest-bus-my-latest-iphone-app-is-out/</link>
		<comments>http://www.fastchicken.co.nz/2011/10/07/nearest-bus-my-latest-iphone-app-is-out/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 16:53:14 +0000</pubDate>
		<dc:creator>nicwise</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.fastchicken.co.nz/?p=1736</guid>
		<description><![CDATA[My latest iPhone app is now available in the AppStore: Nearest Bus: Nearest Bus is a simple application to answer one question: Where is my nearest bus? Nearest Bus uses the TfL Countdown prediction service to show you when the next bus is coming at the stops near you, so you know when to run for the stop, or when to think ...]]></description>
			<content:encoded><![CDATA[<p>My latest iPhone app is now available in the AppStore: <strong><a href="http://itunes.apple.com/gb/app/nearest-bus/id467335377?ls=1&amp;mt=8">Nearest Bus</a></strong>:</p>
<p><a href="http://itunes.apple.com/gb/app/nearest-bus/id467335377?ls=1&#038;mt=8"><img class="size-full wp-image-1108 aligncenter" title="appstore" src="http://www.fastchicken.co.nz/wp-content/uploads/2010/02/appstore.jpg" alt="" width="161" height="60" /></a></p>
<p><img class="size-medium wp-image-1737 aligncenter" title="Photo 05-10-2011 13 17 12" src="http://www.fastchicken.co.nz/wp-content/uploads/2011/10/Photo-05-10-2011-13-17-12-266x400.png" alt="" width="266" height="400" /></p>
<p><strong>Nearest Bus is a simple application to answer one question:</strong></p>
<blockquote><p>Where is my nearest bus?</p></blockquote>
<p>Nearest Bus uses the <a href="http://countdown.tfl.gov.uk">TfL Countdown</a> prediction service to show you when the next bus is coming at the stops near you, so you know when to run for the stop, or when to think about catching a taxi instead.</p>
<p>It will show you the 16 stops nearest to your current location &#8211; within 250m in all directions &#8211; and on the back of the card, it shows you where the bus stop is in relation to you, in case you are having trouble finding it:</p>
<p><img class="size-medium wp-image-1738 aligncenter" title="Photo 05-10-2011 13 24 42" src="http://www.fastchicken.co.nz/wp-content/uploads/2011/10/Photo-05-10-2011-13-24-42-266x400.png" alt="" width="266" height="400" /></p>
<p><strong>It is designed for you to quickly see when a bus is coming.</strong> It&#8217;s not a bus planner (that&#8217;d be the excellent <a href="http://mbarclay.net/london-bus/">London Travel</a>), it just answers the question:</p>
<blockquote><p>Where is the <strong>Nearest Bus</strong>?</p></blockquote>
<p>There are some caviets tho:</p>
<ul>
<li>The countdown service is a &#8220;beta&#8221;, so TfL may decide to remove it. They have publicly said they are working on an official API, but keep in mind this may stop working at any time.</li>
<li>If you are not in London, or within 250m of a bus stop, it&#8217;s pretty useless. If you live in the US, don&#8217;t buy it. Or rather, DO buy it, but don&#8217;t complain about it.</li>
<li>Read the first one again.</li>
</ul>
<div><span style="font-size: small;"><span class="Apple-style-span" style="line-height: 24px;"><a href="http://itunes.apple.com/gb/app/nearest-bus/id467335377?ls=1&amp;mt=8"><img class="aligncenter" title="appstore" src="http://www.fastchicken.co.nz/wp-content/uploads/2010/02/appstore.jpg" alt="" width="161" height="60" /></a><br />
</span></span></div>
<p>Any <a href="mailto:support@fastchicken.co.nz">feedback is always welcome</a>. Nearest Bus is 100% iOS5 compatible, and 100% <a href="http://ios.xamarin.com/">MonoTouch</a>.</p>
<p>I&#8217;m planning on adding a few more features, and supporting the official API when / if it comes out. Enjoy!</p>
<div><span class="Apple-style-span" style="font-size: 16px; line-height: 24px;"><br />
</span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.fastchicken.co.nz/2011/10/07/nearest-bus-my-latest-iphone-app-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scaling and Rotating an image in MonoTouch</title>
		<link>http://www.fastchicken.co.nz/2011/03/28/scaling-and-rotating-an-image-in-monotouch/</link>
		<comments>http://www.fastchicken.co.nz/2011/03/28/scaling-and-rotating-an-image-in-monotouch/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 13:41:20 +0000</pubDate>
		<dc:creator>nicwise</dc:creator>
				<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.fastchicken.co.nz/?p=1375</guid>
		<description><![CDATA[I&#8217;ve been messing with this code for a couple of days, and finally got it working over the weekend. The problem was, when using an image taken on the iPhone, the image is stored the same way each time (landscape, I think), but with the rotation stored in the EXIF data. If you want a proper JPEG &#8211; or even ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been messing with this code for a couple of days, and finally got it working over the weekend.</p>
<p>The problem was, when using an image taken on the iPhone, the image is stored the same way each time (landscape, I think), but with the rotation stored in the EXIF data. If you want a proper JPEG &#8211; or even to scale the original &#8211; you have to do the rotation yourself. Which is kinda nasty.</p>
<p>I found various bits of code around which should do this, <a href="http://stackoverflow.com/questions/4739231/uiimage-data-always-in-landscape-mode">including a MonoTouch port</a>, but in general, they didn&#8217;t work. I think the problem was all about the CoreGraphics co-ordinates vrs screen or UIKit co-ordinates.</p>
<p>So, <a href="https://gist.github.com/890460">here&#8217;s my code</a> &#8211; which I ported from someone else&#8217;s, so I can&#8217;t really claim it. But I hope it&#8217;s of help to someone!</p>
<p><script src="https://gist.github.com/890460.js"> </script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fastchicken.co.nz/2011/03/28/scaling-and-rotating-an-image-in-monotouch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wellington .NET User Group &#8211; MonoTouch and MonoDroid</title>
		<link>http://www.fastchicken.co.nz/2010/12/16/wellington-net-user-group-monotouch-and-monodroid/</link>
		<comments>http://www.fastchicken.co.nz/2010/12/16/wellington-net-user-group-monotouch-and-monodroid/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 01:56:02 +0000</pubDate>
		<dc:creator>nicwise</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.fastchicken.co.nz/?p=1201</guid>
		<description><![CDATA[I did a presentation last night at the last Wellington .NET User Group meeting of the year. It went down well (so I&#8217;m told &#8211; hard to tell from my side of it!), and it was good catching up with people afterwards. I&#8217;ve put the slides here for those who want them. Enjoy!]]></description>
			<content:encoded><![CDATA[<p>I did a presentation last night at the last Wellington .NET User Group meeting of the year. It went down well (so I&#8217;m told &#8211; hard to tell from my side of it!), and it was good catching up with people afterwards.</p>
<p><a href="http://www.fastchicken.co.nz/wp-content/uploads/2010/12/WellingtonDUGPreso.pdf">I&#8217;ve put the slides here for those who want them</a>. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fastchicken.co.nz/2010/12/16/wellington-net-user-group-monotouch-and-monodroid/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>mobileAgent for FreeAgent 1.0 is out!</title>
		<link>http://www.fastchicken.co.nz/2010/10/21/mobileagent-for-freeagent-1-0-is-out/</link>
		<comments>http://www.fastchicken.co.nz/2010/10/21/mobileagent-for-freeagent-1-0-is-out/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 08:30:06 +0000</pubDate>
		<dc:creator>nicwise</dc:creator>
				<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.fastchicken.co.nz/?p=1121</guid>
		<description><![CDATA[The latest Big Ted creation is finally out! I&#8217;ve been working on an iPhone client for FreeAgent (a UK-based SaaS accounting package which I use) for a few months &#8211; it would have been out a lot earlier, but I got a little side-tracked by London Bike App The result is mobileAgent. There is a load more information on the ...]]></description>
			<content:encoded><![CDATA[<p>The latest Big Ted creation is finally out! I&#8217;ve been working on an iPhone client for <a href="http://www.freeagentcentral.com">FreeAgent</a> (a UK-based SaaS accounting package which I use) for a few months &#8211; it would have been out a lot earlier, but I got a little side-tracked by <a href="http://www.londonbikeapp.com">London Bike App</a> <img src='http://www.fastchicken.co.nz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The result is <a href="/mobileagent/">mobileAgent</a>.</p>
<p>There is a load more information on the <a href="/mobileagent/">mobileAgent page</a>, but the TL;DR version is:</p>
<ul>
<li>Enter timeslips and mileage expenses on your iPhone, as you are on the move. Better yet, as you incur them! No more forgetting what you did, or trying to remember which days you worked at the end of the month.</li>
<li>Works online and offline, so you can do it on the tube (or in a high-altitude tube), and sync up when you have a signal.</li>
<li>Works on iPhone and iPod Touch.</li>
</ul>
<p>Coming in the next version, which is mostly coded and tested is:</p>
<ul>
<li>Expense entry</li>
<li>A timer, so you can start a task, and then log it with the elapsed time</li>
<li>A odometer tracker, so you can enter the start odometer value, drive somewhere, enter the end odometer value, and log it as a mileage expense.</li>
</ul>
<p><a href="http://goo.gl/IuBU">It&#8217;s available in the AppStore now</a>. I will most likely post a more technical post-mortem later, with some of the things I learned from the development, later.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fastchicken.co.nz/2010/10/21/mobileagent-for-freeagent-1-0-is-out/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>On The Telly &#8211; Offline iPhone client for BBC iPlayer</title>
		<link>http://www.fastchicken.co.nz/2010/04/14/on-the-telly-offline-iphone-client-for-bbc-iplayer/</link>
		<comments>http://www.fastchicken.co.nz/2010/04/14/on-the-telly-offline-iphone-client-for-bbc-iplayer/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 14:02:24 +0000</pubDate>
		<dc:creator>nicwise</dc:creator>
				<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.fastchicken.co.nz/?p=889</guid>
		<description><![CDATA[I&#8217;ve been playing with MonoTouch a bit of late, mostly as I wanted to learn CocoaTouch (the iPhone apis), but try and seperate myself from the language (Objective-C) vrs just how the API holds together. On The Telly is the result. Update: BBC changed how their download interface works, so this may not work any more. Paul has more info ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing with MonoTouch a bit of late, mostly as I wanted to learn CocoaTouch (the iPhone apis), but try and seperate myself from the language (Objective-C) vrs just how the API holds together.<strong> On The Telly</strong> is the result.</p>
<p><strong>Update:</strong> BBC changed how their download interface works, so this may not work any more.<a href="http://po-ru.com/diary/bbc-fights-against-openness-again/"> Paul has more info here</a>. It might still work, being it&#8217;s running on an i-Device, so the certificates are available, but I&#8217;ve not tried it.</p>
<p><strong>Update:</strong> <a href="https://github.com/nicwise/onthetelly">I&#8217;ve moved the code here</a>. Fork it etc as you want.</p>
<p><strong>What is it?</strong></p>
<p>On The Telly is a iPhone application which allows for offline viewing of BBC iPlayer content on the iPhone. iPlayer serves a h.264 stream to the iPhone, however this only works streaming over WiFi, so it&#8217;s not a lot of use if you are on a train or the tube. iPlayer does support offline viewing on other devices, but they must support DRM. As you can&#8217;t get the h.264 files off the iPhone, this is sort of redundant.</p>
<blockquote><p>For those in the US, substitute &#8220;iPlayer&#8221; for &#8220;Hulu&#8221; &#8211; same idea, different country.</p></blockquote>
<p>The source code for this is below. It&#8217;s really only of use to you if you want to see how it works (which is the point) as Apple prevents it being in the appstore (good old clause 3.3.1), and <a href="http://www.theregister.co.uk/2010/03/05/bbc_iphone/">BBC does not license it&#8217;s content for non-personal use</a>. But it was fun to write, and might serve as guidance for someone else building either a MonoTouch application, or even a &#8220;normal&#8221; iPhone application if they are coming from a .NET background.</p>
<blockquote><p><strong>Side rant: </strong>On <a href="http://daringfireball.net/2010/04/why_apple_changed_section_331">Clause 3.3.1</a>, I&#8217;d challenge anyone to tell the difference between this and an Objective-C-coded application <em>except</em> that the file size of the app is around 2meg, and if done in Objective-C it would be around 1meg, as a MonoTouch application has to include some of the Mono framework, which can&#8217;t be excluded by the compiler. Other than that, this is a non-cross platform, native iPhone app. If you know Objective-C, you&#8217;ll be able to follow allow in the code, because it&#8217;s mostly syntacticly different, not functionally. The objects created and used &#8211; UIButton, UITableViewController et al &#8211; are the same as an Objective-C app would use (not even mappings or intermediate layers &#8211; <em>the same classes and code</em>).</p>
<p>Of course, if Apple keep clause 3.3.1 in as they have it now, at least I&#8217;ll not lose any skills I&#8217;ve learned doing this.</p>
<p>Anyone who says it&#8217;s about multitasking is full of shit, and has not seen the APIs for multitasking. It&#8217;s about Adobe, pure and simple.</p></blockquote>
<p>Anyway, back to the app!</p>
<p style="text-align: center;"><a href="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/IMG_0727.jpg"><img class="alignnone size-medium wp-image-898" title="IMG_0727" src="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/IMG_0727-266x400.jpg" alt="" width="266" height="400" /></a> <a href="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/IMG_0739.jpg"><img class="alignnone size-medium wp-image-897" title="IMG_0739" src="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/IMG_0739-266x400.jpg" alt="" width="266" height="400" /></a></p>
<p style="text-align: center;"><a href="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/IMG_0744.jpg"><img class="alignnone size-medium wp-image-892" title="IMG_0744" src="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/IMG_0744-266x400.jpg" alt="" width="266" height="400" /></a> <a href="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/IMG_0745.jpg"><img class="alignnone size-medium wp-image-891" title="IMG_0745" src="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/IMG_0745-266x400.jpg" alt="" width="266" height="400" /></a></p>
<p style="text-align: center;"><a href="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/IMG_0740.jpg"><img class="alignnone size-medium wp-image-896" title="IMG_0740" src="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/IMG_0740-266x400.jpg" alt="" width="266" height="400" /></a> <img class="alignnone size-medium wp-image-895" title="IMG_0741" src="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/IMG_0741-266x400.jpg" alt="" width="266" height="400" /></p>
<p style="text-align: center;"><img class="alignnone size-medium wp-image-894" title="IMG_0742" src="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/IMG_0742-266x400.jpg" alt="" width="266" height="400" /> <a href="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/IMG_0743.jpg"><img class="alignnone size-medium wp-image-893" title="IMG_0743" src="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/IMG_0743-266x400.jpg" alt="" width="266" height="400" /></a></p>
<p style="text-align: center;">&nbsp;</p>
<p>The application consists of a number of tabs:</p>
<ul>
<li>The download tab. This contains the shows which have been downloaded.</li>
<li>The queue tab. This has shows which have been queued for downloading</li>
<li>The Features tab. This shows the featured and highlighted shows on iPlayer</li>
<li>News and other category tabs. These show the shows in each category.</li>
</ul>
<p>BBC limit iPlayer to disallow downloads from outside the UK, or over 3G. The app will most likely crash if you try, or say content is not available. Dont ask why you can&#8217;t download a specific show if you are on 3G (in the UK) or anywhere outside of the UK.</p>
<p>Feedback so far has been positive, but none of it has been from the BBC. Oh, well. It was fun to write.</p>
<p><a href="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/OnTheTelly-source.zip">Here is the source code.</a> It needs various things in order to run:</p>
<ul>
<li><a href="http://monotouch.net/Store">MonoTouch 2.x</a>. You can use the trial version, but only in the iPhone simulator.</li>
<li><a href="http://monotouch.net/Documentation/Installation">MonoDevelop and Mono</a></li>
<li><a href="http://developer.apple.com/iphone/index.action">Apple XCode / iPhone SDK</a>.</li>
<li>A Mac and an iPhone development license from apple, especially if you want to put it on a device. Duh. Just the Mac if you want to run in the simulator.</li>
</ul>
<p>I think the application has good examples of:</p>
<ul>
<li>Background processing, keeping work off the main (UI) thread</li>
<li>Database access (sqlite) on the iPhone</li>
<li>Using WebClient to download content</li>
<li>Image manipulation on the iPhone</li>
<li>What can be done in around 20 hours work using MonoTouch. This was not a complex app to write, thanks to Paul&#8217;s work on how to download the shows, in Ruby, and tools like Linq to XML and MonoTouch.</li>
</ul>
<p>Overall, I found MonoTouch and MonoDevelop lovely to use &#8211; except I&#8217;d love to have ReSharper available for MonoDevelop. Using .NET without ReSharper is always a little painful, even if I&#8217;m using Visual Studio!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fastchicken.co.nz/2010/04/14/on-the-telly-offline-iphone-client-for-bbc-iplayer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MonoTouch, TableViewControllers and SegmentedControl</title>
		<link>http://www.fastchicken.co.nz/2010/04/08/monotouch-tableviewcontrollers-and-segmentedcontrol/</link>
		<comments>http://www.fastchicken.co.nz/2010/04/08/monotouch-tableviewcontrollers-and-segmentedcontrol/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 10:26:59 +0000</pubDate>
		<dc:creator>nicwise</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.fastchicken.co.nz/?p=876</guid>
		<description><![CDATA[I&#8217;ve been holding off blogging about MonoTouch recently (tho I&#8217;ve said a bit on twitter) &#8211; mostly because the &#8220;project&#8221; I&#8217;m &#8220;working&#8221; on (read: spare time, but exciting) is something I may not be able to legally release into the app store (and if not, it&#8217;ll be on github as open source). But in the meantime, I thought I&#8217;d share ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been holding off blogging about MonoTouch recently (tho I&#8217;ve said a bit on twitter) &#8211; mostly because the &#8220;project&#8221; I&#8217;m &#8220;working&#8221; on (read: spare time, but exciting) is something I may not be able to legally release into the app store (and if not, it&#8217;ll be on github as open source). But in the meantime, I thought I&#8217;d share this little nugget.</p>
<p>I&#8217;ve seen, in a number of applications, the use of the SegmentedControl in the header / title of a TableViewController. Something like this, from the Guardian app:</p>
<p style="text-align: center;"><img class="size-full wp-image-878 aligncenter" title="guardian-segmentedcontrol" src="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/guardian-segmentedcontrol.jpg" alt="" width="320" height="96" /></p>
<p>I thought this would be hard &#8211; some kind of cloned, custom TableViewController or something. But no, the solution (well, my solution, which may not be the official one) really shows just how well thought out Cocoa and CocoaTouch is:</p>
<p>In your ViewDidLoad method:</p>
<p><code>this.NavigationItem.TitleView = MakeSegmentedControl();</code></p>
<p>And the MakeSegmentedControl method looks like this:</p>
<p><code><br />
public UISegmentedControl MakeSegmentedControl()<br />
{<br />
UISegmentedControl seg = new UISegmentedControl(new RectangleF(0, 0, 200, 25));</code></p>
<p><code> seg.InsertSegment("Highlights", 0, false);<br />
seg.InsertSegment("Popular", 1, false);<br />
seg.SelectedSegment = 0;</code></p>
<p><code>seg.ControlStyle = UISegmentedControlStyle.Bar;</code></p>
<p><code> </code></p>
<p><code> seg.ValueChanged += delegate(object sender, EventArgs e) {<br />
if (seg.SelectedSegment == 0)<br />
{<br />
(TableView.Source as DataSource).LoadPrograms(IplayerConst.HighlightsFeedUrl);<br />
} else {<br />
(TableView.Source as DataSource).LoadPrograms(IplayerConst.MostPopularFeedUrl);<br />
}<br />
return seg;<br />
}<br />
</code></p>
<div>And the end result looks like this:</div>
<p style="text-align: center;"><img class="size-full wp-image-877 aligncenter" title="bt-segmentedcontrol" src="http://www.fastchicken.co.nz/wp-content/uploads/2010/04/bt-segmentedcontrol.jpg" alt="" width="320" height="64" /></p>
<div>Easy and painless.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.fastchicken.co.nz/2010/04/08/monotouch-tableviewcontrollers-and-segmentedcontrol/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

Served from: www.fastchicken.co.nz @ 2012-02-05 10:18:39 -->
