<?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>KevFoo &#187; iphone</title>
	<atom:link href="http://blog.kevfoo.com/index.php/tag/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kevfoo.com</link>
	<description>The weblog of a Chicago based .Net and iPhone developer.</description>
	<lastBuildDate>Wed, 26 May 2010 13:33:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>6 Thoughts about Evernote&#8217;s App Design</title>
		<link>http://blog.kevfoo.com/index.php/2010/04/6-thoughts-about-evernotes-app-design/</link>
		<comments>http://blog.kevfoo.com/index.php/2010/04/6-thoughts-about-evernotes-app-design/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 03:25:00 +0000</pubDate>
		<dc:creator>Kevin McMahon</dc:creator>
				<category><![CDATA[App Design]]></category>
		<category><![CDATA[Evernote]]></category>
		<category><![CDATA[UX]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Application Load]]></category>
		<category><![CDATA[Bad Experience]]></category>
		<category><![CDATA[Cellular Networks]]></category>
		<category><![CDATA[Color Scheme]]></category>
		<category><![CDATA[Data Input]]></category>
		<category><![CDATA[Design Decisions]]></category>
		<category><![CDATA[Distinct Actions]]></category>
		<category><![CDATA[Happy Accident]]></category>
		<category><![CDATA[Ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Launch]]></category>
		<category><![CDATA[Load Time]]></category>
		<category><![CDATA[Logo Font]]></category>
		<category><![CDATA[Mobile Apps]]></category>
		<category><![CDATA[Mobile Device]]></category>
		<category><![CDATA[Mobile Versions]]></category>
		<category><![CDATA[Optimal Experience]]></category>
		<category><![CDATA[Rsquo]]></category>
		<category><![CDATA[Seamless Integration]]></category>
		<category><![CDATA[Sluggishness]]></category>
		<category><![CDATA[Smart Layout]]></category>
		<category><![CDATA[Softness]]></category>
		<category><![CDATA[Splash Screen]]></category>
		<category><![CDATA[Splash Screens]]></category>
		<category><![CDATA[Tab Bar]]></category>
		<category><![CDATA[Taking A Closer Look]]></category>
		<category><![CDATA[Ubiquity]]></category>
		<category><![CDATA[Unpredictable Nature]]></category>
		<category><![CDATA[User Experience]]></category>
		<category><![CDATA[Voice Notes]]></category>

		<guid isPermaLink="false">http://blog.kevfoo.com/?p=163</guid>
		<description><![CDATA[Evernote is one of my favorite and most frequently used applications.&#160; The ubiquity of the service via all the devices in my life (laptop, desktop, iPhone, Nexus One, web, and iPad) and the ease in which I can capture and recall notes made adopting it into my daily workflow extremely easy.&#160; By taking a closer [...]]]></description>
			<content:encoded><![CDATA[<p>Evernote is one of my favorite and most frequently used applications.&#160; The ubiquity of the service via all the devices in my life (laptop, desktop, iPhone, Nexus One, web, and iPad) and the ease in which I can capture and recall notes made adopting it into my daily workflow extremely easy.&#160; By taking a closer look at the clients, it became clear that the user experience, and the design decisions behind them, wasn’t a happy accident.</p>
<p>Lately I have been thinking about user design and experience as I prep my app for the App Store.&#160; Here are six things that stood out most about the Evernote iPhone app and the take-away ideas I got from looking closer at the app.</p>
<h3>1. The mobile apps immediately present 4 distinct actions for note acquisition.</h3>
<p><a href="http://blog.kevfoo.com/wp-content/uploads/2010/03/IMG_0448.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="IMG_0448" border="0" alt="IMG_0448" src="http://blog.kevfoo.com/wp-content/uploads/2010/03/IMG_0448_thumb.png" width="164" height="244" /></a></p>
<p>Evernote breaks down into two key activities: note acquisition and note retrieval.&#160; Given the detached nature of the mobile device and the sluggishness still experienced with cellular networks, the note browsing and searching experience is not ideal.&#160; The constraints of the device and the unpredictable nature of the network, I believe, led to a focus on what a mobile device is good for (note capturing) and make that the key action in the mobile versions of its application.</p>
<p>Having the app launch into the note acquisition screen implicitly signals to the user that this is the type of activity that you should be doing on the device.&#160; It seems counterintuitive to restrict features to simply not port them directly from the desktop or web offering.&#160; But by limiting the scope of the application, it actually maximizes the experience for the user.&#160; In Evernote’s case they cannot completely focus on note capture at the expense of cutting out the other actions.&#160; These additional activities are included, but they are relegated to the tab bar on the iPhone and the sub menus on Android devices.</p>
<h3>2. Smart layout and design can make sub-optimal experience tolerable</h3>
<p><a href="http://blog.kevfoo.com/wp-content/uploads/2010/03/IMG_0450.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IMG_0450" border="0" alt="IMG_0450" src="http://blog.kevfoo.com/wp-content/uploads/2010/03/IMG_0450_thumb.png" width="164" height="244" /></a>&#160;<a href="http://blog.kevfoo.com/wp-content/uploads/2010/04/IMG_0466.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IMG_0466" border="0" alt="IMG_0466" src="http://blog.kevfoo.com/wp-content/uploads/2010/04/IMG_0466_thumb.png" width="244" height="164" /></a></p>
<p>&#160;</p>
<p>Given the limited real estate available on mobile devices, it is unsurprising that note browsing is a sub-optimal experience.&#160; That being said, I think that Evernote does an excellent job making due with what little space it has.&#160; Visually we are given two options, depending on the orientation of the phone, in which we can browse our catalog of notes.&#160; While holding the phone in portrait mode, each note’s metadata is visible and allows the user to see titles and tags in addition to a thumbnail image of the note.&#160; While holding the phone in landscape mode, the note browser is transformed into a tiled-thumbnail view which shows more notes in the visible frame.&#160; If you can recognize the note by the rough appearance or layout of the text, you can pretty rapidly find what you are looking for.&#160; </p>
<p>Most people hold the phone in portrait mode so it follows that the default view is the easier of the two to quickly grasp.&#160; The two views provide the user with choices and trade offs: lower information density with a greater amount of detail or higher information density with less detail.&#160; By giving the user options, Evernote overcomes the inherent limitations of the mobile device and improves the user experience.</p>
<h3>3. Search function is a key but clunky feature in the mobile app.</h3>
<p><a href="http://blog.kevfoo.com/wp-content/uploads/2010/03/IMG_0449.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IMG_0449" border="0" alt="IMG_0449" src="http://blog.kevfoo.com/wp-content/uploads/2010/03/IMG_0449_thumb.png" width="164" height="244" /></a><a href="http://blog.kevfoo.com/wp-content/uploads/2010/03/IMG_0452.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IMG_0452" border="0" alt="IMG_0452" src="http://blog.kevfoo.com/wp-content/uploads/2010/03/IMG_0452_thumb.png" width="164" height="244" /></a></p>
<p>Evernote has outstanding OCR software that makes everything searchable.&#160; Given that search is the killer feature of Evernote, it is surprising that search on mobile devices seems like a second-class citizen.&#160; The typical standard search box is visible on most of the non-note capturing screens, and the text search works as expected.&#160; Search does have some enhanced features like map view and search near here offered as options to help refine your search, but I am not a fan of either.&#160; The actual search queries appear to be executed on the server side and, as a result, the processing time can vary depending on your network connection.&#160; In order to do a location based search the app has to make network requests for the search results and get the map coordinates, and this typically translates to a noticeable wait when these types of searches are performed.&#160; I feel like search could cut out the location-based search filter entirely and be no worse off.</p>
<h3>4. Sync Button is a “kitchen drawer” tab on the iPhone App</h3>
<p>The sync tab is mislabeled, and the label masks all the other functions that are exposed on that tab.&#160; Contextually, account information and device-specific settings aren’t readily associated to sync even though the sync process in Evernote synchronizes everything associated to your account.&#160; The action of synchronizing your notes could be integrated into the note screen, and the settings, account information, and about information could all be separate tabs managed by the tab controller already being utilized in the iPhone application.&#160; In fairness the move to limit the tabs is consistent with the less-is-more type of attitude, and the combination of the multiple actions into the single tab is most likely a compromise to simplify the interface.</p>
<h3>5. The tips UX on the iPhone is well executed and non-obtrusive</h3>
<p><a href="http://blog.kevfoo.com/wp-content/uploads/2010/04/evernotetips.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="evernotetips" border="0" alt="evernotetips" src="http://blog.kevfoo.com/wp-content/uploads/2010/04/evernotetips_thumb.jpg" width="164" height="244" /></a></p>
<p>The tips screen, integrated into the main view of the Evernote iPhone app, is an excellent way of sharing information about features and activities without being pushy and obtrusive.&#160; With a smooth animation that peels back the main view to show the tips view, the user can get a quick suggestion on a feature and then be back capturing or browsing notes.&#160; This is a small but well executed design element that adds to the experience.</p>
<h3>6. Sharp branding</h3>
<h3><a href="http://blog.kevfoo.com/wp-content/uploads/2010/03/IMG_0447.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="IMG_0447" border="0" alt="IMG_0447" src="http://blog.kevfoo.com/wp-content/uploads/2010/03/IMG_0447_thumb.png" width="164" height="244" /></a></h3>
<p>As far as the aesthetics go, I like the Evernote logo.&#160; A combination of an elephant and piece of paper plays off the “memory like an elephant” saying and the note-based nature of the application.&#160; The logo, paired nicely with a soft green color and a nice font, is the focal point of the splash screen welcoming you into the application.&#160; The other platforms do not utilize a splash screen since the application load times aren’t as great as the iPhone, but the same basic logo/font/color scheme is consistent in the icons used on all platforms.</p>
<h3>Lessons learned from the Evernote app:</h3>
<ul>
<li>Instead of frustrating users with clunky interfaces and hacks to enable certain features of your service or app, only port features or activities that enhance the service and take advantage of the features of mobile devices rather than expose the limitations of them. </li>
<li>Focus on the activities that can capitalize on the advantages of a mobile device instead of fighting the platform. </li>
<li>Optimize for those specific use cases that make sense that you want to capitalize on. </li>
<li>Be ruthless in what you cut out or be stingy in what you put into the mobile version </li>
<li>Be consistent in your branding, color scheme, and feel of your applications. </li>
<li>Good design can always speak louder than any type of instruction.&#160; Help users fall into the pit of success. </li>
</ul>
<p><em>You can get the iPhone app in the </em><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=281796108&amp;mt=8"><em>iTunes App Store</em></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevfoo.com/index.php/2010/04/6-thoughts-about-evernotes-app-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on the Day of Mobile conference</title>
		<link>http://blog.kevfoo.com/index.php/2010/03/thoughts-on-the-day-of-mobile-conference/</link>
		<comments>http://blog.kevfoo.com/index.php/2010/03/thoughts-on-the-day-of-mobile-conference/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 06:15:23 +0000</pubDate>
		<dc:creator>Kevin McMahon</dc:creator>
				<category><![CDATA[conferences]]></category>
		<category><![CDATA[dayofmobile]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[Business Models]]></category>
		<category><![CDATA[Catalogs]]></category>
		<category><![CDATA[Closest Thing]]></category>
		<category><![CDATA[Cool Tools]]></category>
		<category><![CDATA[David Whatley]]></category>
		<category><![CDATA[Headaches]]></category>
		<category><![CDATA[Inaugural Conference]]></category>
		<category><![CDATA[Insights]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Last Saturday]]></category>
		<category><![CDATA[Laughs]]></category>
		<category><![CDATA[Main Themes]]></category>
		<category><![CDATA[Mobile Web]]></category>
		<category><![CDATA[Niche]]></category>
		<category><![CDATA[Platform Development]]></category>
		<category><![CDATA[Risk Reward]]></category>
		<category><![CDATA[Scenarios]]></category>
		<category><![CDATA[Sessions]]></category>
		<category><![CDATA[Ways To Make Money]]></category>
		<category><![CDATA[Win Lottery]]></category>
		<category><![CDATA[Win The Lottery]]></category>

		<guid isPermaLink="false">http://blog.kevfoo.com/index.php/2010/03/thoughts-on-the-day-of-mobile-conference/</guid>
		<description><![CDATA[Here is a collection of thoughts that I had about the Day of Mobile conference held at IIT last Saturday.&#160; This was the inaugural conference put together by the Tech in the Middle guys, and I thought that they did a great job.&#160; I look forward to seeing what they do next.
Overall Themes
Two main themes [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a collection of thoughts that I had about the <a href="http://www.techinthemiddle.com/DayOfMobile/">Day of Mobile</a> conference held at IIT last Saturday.&#160; This was the inaugural conference put together by the <a href="http://www.techinthemiddle.com">Tech in the Middle</a> guys, and I thought that they did a great job.&#160; I look forward to seeing what they do next.</p>
<h3>Overall Themes</h3>
<p>Two main themes that emerged during the sessions: the future of mobile is web-based apps rather than device specific apps, and the road to mobile riches probably doesn’t run through an app store.</p>
<h3>Multi-platform development is hard</h3>
<p>Certainly scenarios exist where multi-platform apps make sense, but it is imperative that the risk/reward ratio be in your favor to have a chance to be successful.&#160; Don’t underestimate the amount of effort and headaches that developing and supporting multi-platform apps will create.&#160; Going the mobile web app route has it’s limitations, but it is the closest thing to “write once, run anywhere” that mobile has.</p>
<h3>Cool Tools</h3>
<p>Really cool tools like <a href="http://www.phonegap.com">PhoneGap</a> and <a href="http://www.jqtouch.com">jQTouch</a> are out there that help lower the barriers to making apps and, in the case of PhoneGap, multi-platform apps.&#160; Both tools have been released under MIT licenses and are free to use.</p>
<h3>One Man’s Secret Sauce for Success</h3>
<p>David Whatley gave a funny presentation that provided a lot of laughs and some great insights into how the iPhone app store works.&#160; Even better was his ability to back up what he was saying with some real sales data and numbers.&#160; His secret sauce for success:&#160; PR, code re-use, and playing to your strengths.</p>
<h3>App stores are glorified catalogs</h3>
<p>Standing out or even being noticed amongst all the other apps is extremely difficult.&#160; Relying only on the app catalog to drive sales is effectively a “post and pray” strategy akin to trying to win the lottery.&#160; Try to find a niche and solve a problem.&#160; Focus on creating value for markets not just an app for it.&#160; Mark Murphy described many ways to <a href="http://www.slideshare.net/commonsguy/making-money-at-mobile">make money in mobile</a> other than direct app sales during his talk and in a series of blog posts about <a href="http://www.androidguys.com/2010/03/04/android-business-models/">Android Business Models</a>.</p>
<h3>Links</h3>
<ul>
<li><a href="http://www.phonegap.com">PhoneGap</a> </li>
<li><a href="http://www.jqtouch.com">jQTouch</a> </li>
<li><a href="http://www.iphonedevdepot.com">iPhone Dev Depot</a> </li>
<li><a href="http://www.slideshare.net/jschwan/mobile-web-development-tips-and-tricks">Mobile Web Development Tips and Tricks (Slides)</a> </li>
<li><a href="http://www.slideshare.net/commonsguy/making-money-at-mobile">Making Money at Mobile (Slides)</a> </li>
<li><a title="http://github.com/mikelaurence/CoreResource" href="http://github.com/mikelaurence/CoreResource">http://github.com/mikelaurence/CoreResource</a> (Cool iPhone library) </li>
</ul>
<h3>Books Recommended During the Conference</h3>
<ul>
<li><a href="http://www.amazon.com/gp/product/093849743X?ie=UTF8&amp;tag=kev02-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=093849743X">Aiming at Amazon</a> </li>
<li><a href="http://www.amazon.com/gp/product/1591841666?ie=UTF8&amp;tag=kev02-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1591841666">The Dip</a> </li>
<li><a href="http://www.amazon.com/gp/product/0307409503?ie=UTF8&amp;tag=kev02-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0307409503">The Whuffie Factor</a> </li>
</ul>
<p>Overall, the signal-to-noise ratio at the conference was good but not great.&#160; I did manage to glean at least one or two new ideas from most of the sessions I attended, and it was great to see the enthusiasm that the Chicago tech community has for events like this.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevfoo.com/index.php/2010/03/thoughts-on-the-day-of-mobile-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nexus One &#8211; First Impressions</title>
		<link>http://blog.kevfoo.com/index.php/2010/02/nexus-one-first-impressions/</link>
		<comments>http://blog.kevfoo.com/index.php/2010/02/nexus-one-first-impressions/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 04:24:11 +0000</pubDate>
		<dc:creator>Kevin McMahon</dc:creator>
				<category><![CDATA[nexus one]]></category>
		<category><![CDATA[3gs]]></category>
		<category><![CDATA[Active Desktop]]></category>
		<category><![CDATA[Amount Of Money]]></category>
		<category><![CDATA[First Impressions]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Interaction]]></category>
		<category><![CDATA[Interactive Widgets]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Lcd Screens]]></category>
		<category><![CDATA[Light Situations]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Nexus]]></category>
		<category><![CDATA[Oled Screen]]></category>
		<category><![CDATA[Pandora]]></category>
		<category><![CDATA[Perspective]]></category>
		<category><![CDATA[Short Time]]></category>
		<category><![CDATA[Signs]]></category>
		<category><![CDATA[Sluggishness]]></category>
		<category><![CDATA[Ui]]></category>
		<category><![CDATA[User Experience]]></category>

		<guid isPermaLink="false">http://blog.kevfoo.com/index.php/2010/02/nexus-one-first-impressions/</guid>
		<description><![CDATA[My thoughts on the Nexus One and the Android OS?&#160; I like it.&#160; A lot. 
Likes:

Speed.&#160; I have the older iPhone 3G hardware and from a user experience perspective it was not that bad.&#160; When compared to the Nexus One, however, it is down right sluggish.&#160; This probably isn’t as big of a factor when [...]]]></description>
			<content:encoded><![CDATA[<p>My thoughts on the <a href="http://www.google.com/phone">Nexus One</a> and the Android OS?&#160; I like it.&#160; A lot. </p>
<p>Likes:</p>
<ul>
<li>Speed.&#160; I have the older iPhone 3G hardware and from a user experience perspective it was not that bad.&#160; When compared to the Nexus One, however, it is down right sluggish.&#160; This probably isn’t as big of a factor when comparing a 3GS versus Nexus One, but for someone coming from a 3G iPhone, it is a huge plus.</li>
<li>Being able to run apps in the background.&#160; Browsing the web while streaming Pandora and downloading an app in the background works flawlessly and shows no noticeable signs of lag or sluggishness.</li>
<li>The OLED screen is really nice.&#160; Higher resolution and OLED screen looks great in low-light situations and is supposed to save precious battery by not drawing less power than normal LCD screens.</li>
<li>The Android OS is pretty sweet.&#160; It has a lot of nice features like the status bar, an active “desktop” that you can put interactive widgets on as well as app icons, and an easy way to get music and files on and off the device.&#160;&#160; </li>
<li>Integration with Google Apps is fantastic as expected.&#160; I love getting mail and talk updates in the status bar and the overall experience with the apps on the Nexus One is better than on the iPhone. </li>
</ul>
<p>Dislikes:</p>
<ul>
<li>Cut and Paste is clunky.&#160; I can see why Apple needed to spend awhile working out the UX issues before rolling it out.</li>
<li>The touch interaction with the device has not been as good as the iPhone in my experience.&#160; I am not sure where the blame lies (hardware or software), but I sometimes find it difficult to select elements in the UI.&#160; This is not something that occurs frequently, but in the short time I’ve owned the device, it has occurred enough to be noticeable. </li>
<li>4GB of storage out of the box is lacking.&#160; It is an easy upgrade but given the amount of money that Google is charging for the device, this seems like they are skimping here.</li>
<li>The <a href="http://www.android.com/market/">Android Market</a> place experience is integrated nicely but isn’t as tightly integrated as the iTunes App Store.&#160; This is arguably a good or a bad thing depending on how you look at it.&#160; As a user this is a bad thing since it makes finding and buying apps more difficult than just popping open iTunes.&#160; I’ve found the Android Marketplace, both on the phone and the web, hard to browse.</li>
</ul>
<p>There are a few negatives that I can’t pin exclusively on the device but are still worth noting.&#160; I have been using my AT&amp;T SIM with the Nexus One and most likely will do so until my contract is up in a few months.&#160; With that caveat out of the way, the talk quality seemed poor and the phone gets really hot when talking for periods greater than 10 minutes.&#160; I hesitate to even mention these issues since I am not using the phone on the network it was intended, but&#160; I know there probably are others considering doing what I did, and this feedback might help if someone is on the fence.</p>
<p>The Nexus One is exactly the kind of phone and competition that was needed to push Apple.&#160; I strongly recommend anyone looking for a smartphone to give it serious consideration before running out and getting an iPhone.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevfoo.com/index.php/2010/02/nexus-one-first-impressions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iPhone Wireframes</title>
		<link>http://blog.kevfoo.com/index.php/2010/02/iphone-wireframes/</link>
		<comments>http://blog.kevfoo.com/index.php/2010/02/iphone-wireframes/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 04:10:45 +0000</pubDate>
		<dc:creator>Kevin McMahon</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[wireframes]]></category>
		<category><![CDATA[Aesthetics]]></category>
		<category><![CDATA[Blank Side]]></category>
		<category><![CDATA[Blogs]]></category>
		<category><![CDATA[Cards]]></category>
		<category><![CDATA[Flexibility]]></category>
		<category><![CDATA[Notecards]]></category>
		<category><![CDATA[Personal Preference]]></category>
		<category><![CDATA[Prioritize]]></category>
		<category><![CDATA[Rough Dimensions]]></category>
		<category><![CDATA[Screens]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[Ui]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Visual Spatial Learner]]></category>

		<guid isPermaLink="false">http://blog.kevfoo.com/index.php/2010/02/iphone-wireframes/</guid>
		<description><![CDATA[I stumbled across a great collection of iPhone wireframe templates tonight while going through my feeds.&#160; It got me thinking about the process I’ve been using to layout and design the app I am working on.
I’ve been using regular 3 x 5’ notecards to sketch out different screens for the iPhone app I am working [...]]]></description>
			<content:encoded><![CDATA[<p>I stumbled across a great collection of <a href="http://www.geekchix.org/blog/2010/01/03/a-collection-of-printable-sketch-templates-and-sketch-books-for-wireframing/#mobi">iPhone wireframe templates</a> tonight while going through my feeds.&#160; It got me thinking about the process I’ve been using to layout and design the app I am working on.</p>
<p>I’ve been using regular 3 x 5’ notecards to sketch out different screens for the iPhone app I am working on.&#160; On the ruled side I’ll scribble notes and call out must/should/wish components of the screens to help prioritize features.&#160; On the blank side I’ve been sketching out wireframes of the screens to help get a feel for the UI and flow of the app.</p>
<p><a href="http://blog.kevfoo.com/wp-content/uploads/2010/02/cards_laid_out.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="cards_laid_out" border="0" alt="cards_laid_out" src="http://blog.kevfoo.com/wp-content/uploads/2010/02/cards_laid_out_thumb.jpg" width="244" height="184" /></a> </p>
<p>I’ve played around with <a href="http://www.balsamiq.com/">Balsamiq</a> and, while the tool is fantastic, I find myself still partial to the notecards.&#160; With the same rough dimensions of the iPhone and the flexibility of being able to quickly rearrange and reorder the screens, the cards suit my preferences as a visual-spatial learner well.&#160; </p>
<p>As with most tools and techniques, personal preference plays a large role in how and when they’re employed.&#160; I always enjoy checking out how other people work and try and <strike>steal</strike> glean ideas from them.&#160; I’ve found the following blogs pretty useful for design, usability, and UX.&#160; I hope they help inspire you to create something cool.</p>
<p><a href="http://wireframes.tumblr.com/">I ♥ wireframes</a><br/> <a href="http://infosthetics.com/">information aesthetics</a><br/> <a href="http://www.everydayux.com/">everydayUX</a><br/> <a href="http://sender11.typepad.com/sender11/">Sender 11</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevfoo.com/index.php/2010/02/iphone-wireframes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monotouch Quickie : UIPasteboard Snippet</title>
		<link>http://blog.kevfoo.com/index.php/2010/01/monotouch-quickie-uipasteboard-snippet/</link>
		<comments>http://blog.kevfoo.com/index.php/2010/01/monotouch-quickie-uipasteboard-snippet/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 14:30:10 +0000</pubDate>
		<dc:creator>Kevin McMahon</dc:creator>
				<category><![CDATA[UIPasteboard]]></category>
		<category><![CDATA[monotouch]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Copy And Paste]]></category>
		<category><![CDATA[Docs]]></category>
		<category><![CDATA[Good Measure]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Png]]></category>
		<category><![CDATA[Public Url]]></category>
		<category><![CDATA[Text String]]></category>
		<category><![CDATA[Uniform Type]]></category>
		<category><![CDATA[Uti]]></category>
		<category><![CDATA[Utis]]></category>

		<guid isPermaLink="false">http://blog.kevfoo.com/index.php/2010/01/monotouch-quickie-uipasteboard-snippet/</guid>
		<description><![CDATA[Came across the need to plop a string onto the clipboard (aka UIPasteboard) programatically last night and hit up the MonoTouch docs to see what was involved.&#160; It wasn’t readily apparent what would work for the string expected to be passed as the SetValue method pasteboardType argument.&#160; Turns out, after digging into the official Apple [...]]]></description>
			<content:encoded><![CDATA[<p>Came across the need to plop a string onto the clipboard (aka <a href="http://go-mono.com/docs/monodoc.ashx?link=T%3aMonoTouch.UIKit.UIPasteboard">UIPasteboard</a>) programatically last night and hit up the MonoTouch docs to see what was involved.&#160; It wasn’t readily apparent what would work for the string expected to be passed as the SetValue method pasteboardType argument.&#160; Turns out, after digging into the official Apple docs, the string you need to provide is the Uniform Type Identifier (UTI) that corresponds to the data type being passed (in my case “public.utf8-plain-text”).&#160; For my future reference (always seems to take longer to find things at the iPhone doc site) here is a table of the relevant UTIs that might come in handy in the future.</p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200">string</td>
<td valign="top" width="200">public.utf8-plain-text</td>
</tr>
<tr>
<td valign="top" width="200">JPEG</td>
<td valign="top" width="200">public.jpeg</td>
</tr>
<tr>
<td valign="top" width="200">PNG</td>
<td valign="top" width="200">public.png</td>
</tr>
<tr>
<td valign="top" width="200">Url</td>
<td valign="top" width="200">public.url</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>And for good measure here is a snippet that shows putting a string on the general clipboard and reading it off.</p>
</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:1d9e99c4-fe17-4d21-b71d-52e548770074" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><span style="color: #0000FF;">string</span><span style="color: #000000;"> clipboardText </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">"</span><span style="color: #800000;">Copy and Paste Me!</span><span style="color: #800000;">"</span><span style="color: #000000;">;

UIPasteboard.General.SetValue(clipboardText,
</span><span style="color: #800000;">"</span><span style="color: #800000;">public.utf8-plain-text</span><span style="color: #800000;">"</span><span style="color: #000000;">);
</span><span style="color: #0000FF;">string</span><span style="color: #000000;"> actualClipboardText </span><span style="color: #000000;">=</span><span style="color: #000000;"> UIPasteboard.General.GetValue(</span><span style="color: #800000;">"</span><span style="color: #800000;">public.utf8-plain-text</span><span style="color: #800000;">"</span><span style="color: #000000;">);

Assert.AreSame( clipboardText, actualClipboardText.ToString());</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p>
<p>Enjoy.</p>
<p><em>[Updated(1/30/2010): Replaced NSStrings out with strings]</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevfoo.com/index.php/2010/01/monotouch-quickie-uipasteboard-snippet/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Chatsworth House Keeping and Update</title>
		<link>http://blog.kevfoo.com/index.php/2009/12/chatsworth-house-keeping-and-update/</link>
		<comments>http://blog.kevfoo.com/index.php/2009/12/chatsworth-house-keeping-and-update/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 07:25:12 +0000</pubDate>
		<dc:creator>Kevin McMahon</dc:creator>
				<category><![CDATA[chatsworth]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Chatbot]]></category>
		<category><![CDATA[Chatroom]]></category>
		<category><![CDATA[Chatsworth House]]></category>
		<category><![CDATA[Configuration Experience]]></category>
		<category><![CDATA[Database Right]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Feedback]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Holidays]]></category>
		<category><![CDATA[Home Server]]></category>
		<category><![CDATA[House Keeping]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Logging Feature]]></category>
		<category><![CDATA[Personal Projects]]></category>
		<category><![CDATA[Requestor]]></category>
		<category><![CDATA[Suits]]></category>
		<category><![CDATA[Timestamp]]></category>
		<category><![CDATA[Two Areas]]></category>

		<guid isPermaLink="false">http://blog.kevfoo.com/index.php/2009/12/chatsworth-house-keeping-and-update/</guid>
		<description><![CDATA[I just moved Chatsworth from Google code over to its new home on github.&#160; I’ve got a couple more features in mind and figured now was as good a time as any to make the switch.&#160; I already host my iPhone samples and some personal projects on github and, given the smoother branching and merging [...]]]></description>
			<content:encoded><![CDATA[<p>I just moved <a href="http://blog.kevfoo.com/index.php/2009/01/chatsworth-a-google-talk-group-chat-bot/">Chatsworth</a> from <a href="http://code.google.com/p/chatsworth/">Google code</a> over to its new home on <a href="http://github.com/kevinmcmahon/chatsworth">github</a>.&#160; I’ve got a couple more features in mind and figured now was as good a time as any to make the switch.&#160; I already host my <a href="http://blog.kevfoo.com/index.php/2009/11/fun-with-monotouch-and-multi-level-table-views-without-interface-builder/">iPhone</a> <a href="http://blog.kevfoo.com/index.php/2009/11/monotouch-uialertview-uitextfield-crazy-delicious/">samples</a> and some personal projects on github and, given the smoother branching and merging experience of git, I think it will be more conducive to spiking some features and trying some ideas out.</p>
<p>As for the chatbot, I’ve recently added a link logging feature.&#160; Any URL sent to the chatroom now gets logged to the sqlite database.&#160; Users can query the database right from the chat window by entering <em><strong>/links &lt;number of previous links to return&gt;</strong></em> and the links, timestamp and the person who sent it will be sent in an individual IM to the requestor.</p>
<p>Going forward, the two areas that I think need the most improvement are installation and documentation.&#160; The majority of the questions and feedback that I have received are setup and configuration related.&#160; Improving the installation and documentation stories at this point make the most sense and would be worth the effort.&#160; </p>
<p>On the technical side of things, I am considering making a Chatsworth plugin for Windows Home Server.&#160; Currently I am running the service from my home server and, given the always on nature that suits the chatbot and the low/no maintenance needed to running once it is setup, the pairing seems natural and could help provide a little better setup and configuration experience.</p>
<p>I hope to work on this more over the holidays and please feel free to reach out with a question or feedback.&#160; Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevfoo.com/index.php/2009/12/chatsworth-house-keeping-and-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monotouch: UIAlertView + UITextField = Crazy Delicious</title>
		<link>http://blog.kevfoo.com/index.php/2009/11/monotouch-uialertview-uitextfield-crazy-delicious/</link>
		<comments>http://blog.kevfoo.com/index.php/2009/11/monotouch-uialertview-uitextfield-crazy-delicious/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 17:20:15 +0000</pubDate>
		<dc:creator>Kevin McMahon</dc:creator>
				<category><![CDATA[UIAlertView]]></category>
		<category><![CDATA[UITextField]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[monotouch]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Button Setup]]></category>
		<category><![CDATA[Cancel Button]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Configured]]></category>
		<category><![CDATA[Control]]></category>
		<category><![CDATA[Default Button]]></category>
		<category><![CDATA[Itunes]]></category>
		<category><![CDATA[Message Label]]></category>
		<category><![CDATA[New Control]]></category>
		<category><![CDATA[Stock Control]]></category>
		<category><![CDATA[Two Ways]]></category>
		<category><![CDATA[Ui]]></category>

		<guid isPermaLink="false">http://blog.kevfoo.com/index.php/2009/11/monotouch-uialertview-uitextfield-crazy-delicious/</guid>
		<description><![CDATA[If you have ever tried to buy or install anything from the App Store or iTunes on your iPhone, then you certainly have been prompted for your password by a screen that looks like this:
 
The control used by Apple to prompt you for your password isn’t available out-of-the-box in Cocoa Touch, but fortunately it [...]]]></description>
			<content:encoded><![CDATA[<p>If you have ever tried to buy or install anything from the App Store or iTunes on your iPhone, then you certainly have been prompted for your password by a screen that looks like this:</p>
<p><a href="http://blog.kevfoo.com/wp-content/uploads/2009/11/itunes_pw_iphone.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="itunes_pw_iphone" border="0" alt="itunes_pw_iphone" src="http://blog.kevfoo.com/wp-content/uploads/2009/11/itunes_pw_iphone_thumb.jpg" width="164" height="244" /></a> </p>
<p>The control used by Apple to prompt you for your password isn’t available out-of-the-box in Cocoa Touch, but fortunately it is pretty easy to roll your own.&#160; I’ve put together a <a href="http://github.com/kevinmcmahon/CustomUITextFieldAlertView">sample project</a> that shows a couple different techniques that are available for creating and customizing the control, and I’ll go over a few of them here.</p>
<p>The stock <a href="http://www.go-mono.com/docs/index.aspx?link=T%3AMonoTouch.UIKit.UIAlertView%2FP">UIAlertView</a> control consists of a title label, message label, and typically one or more buttons.&#160; It is important to note that in Monotouch, a default button setup isn’t configured, and buttons have to be added explicitly.&#160; If a UIAlertView is configured without any buttons, then dismissing the control will have to be done programmatically because the user will have no way to dismiss the control.&#160; In both of my examples I’ve configured the control to have two buttons (Cancel and Ok), but I could have gotten by with just one.&#160; If only one button is used, it is important to also note that the button is considered the Cancel button by the control, and the <b><a href="http://www.go-mono.com/docs/monodoc.ashx?link=P%3aMonoTouch.UIKit.UIAlertView.CancelButtonIndex">CancelButtonIndex</a></b> property will refer to that button. </p>
<p><a href="http://blog.kevfoo.com/wp-content/uploads/2009/11/Basic_UIAlertView.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Basic_UIAlertView" border="0" alt="Basic_UIAlertView" src="http://blog.kevfoo.com/wp-content/uploads/2009/11/Basic_UIAlertView_thumb.png" width="244" height="121" /></a></p>
<p>The easiest way to go about composing a UIAlertView with a <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T%3aMonoTouch.UIKit.UITextField">UITextField</a> is to create an instance of a UITextField and add it as a sub-view.&#160; Since you’re adding a layer on top of UIAlertView’s view, the key will be fitting this new control into the UI.&#160; There are two ways of going about this.&#160; The first and maybe most obvious way to solve this problem is to make some room between the message label and buttons for the text field ala the iTunes password prompt.&#160; Since the UIAlertView control has already been laid out, moving those controls around within the frame is not as straight forward a task as it may seem.&#160; Before we tackle that we will explore a simpler method that overlays the text field directly on top of the message label.&#160; You sacrifice being able to display an additional message to the user, but the end result looks professional and is very easy to implement.&#160; This will also be the basis for getting the control to have the same look and feel as the iTunes password prompt, so it is important to understand this prior to attempting to move the controls around.</p>
<p>The key to overlaying the text field on top of the message label is setting the bounding rectangle for the UITextField.&#160; The bounding rectangle is where the text field draws the box in which a user enters text.&#160; For our purposes, the rectangle needs to be drawn in between the title label and the buttons.&#160; It is important to make sure that it covers the area where the message label is drawn.&#160; Thanks to the work of others we know that if we start drawing the text field at the x,y offset of 12,45 that the text field will hide the message label.</p>
<p>The code to overlay the text field is as follows:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:5cf6cd71-f852-4415-a2b2-654336f59dbe" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><span style="color: #0000FF;">void</span><span style="color: #000000;"> PromptForName(HandlerToUse handlerType)
{
    UITextField tf </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> UITextField (</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> System.Drawing.RectangleF (12f, 45f, 260f, 25f));
    tf.BackgroundColor </span><span style="color: #000000;">=</span><span style="color: #000000;"> UIColor.White;
    tf.UserInteractionEnabled </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">true</span><span style="color: #000000;">;
    tf.AutocorrectionType </span><span style="color: #000000;">=</span><span style="color: #000000;"> UITextAutocorrectionType.No;
    tf.AutocapitalizationType </span><span style="color: #000000;">=</span><span style="color: #000000;"> UITextAutocapitalizationType.None;
    tf.ReturnKeyType </span><span style="color: #000000;">=</span><span style="color: #000000;"> UIReturnKeyType.Done;
    tf.SecureTextEntry </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">false</span><span style="color: #000000;">; 

    UIAlertView myAlertView </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> UIAlertView
    {
        Title </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">"</span><span style="color: #800000;">Please enter your name</span><span style="color: #800000;">"</span><span style="color: #000000;">,
        Message </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">"</span><span style="color: #800000;">this line is hidden</span><span style="color: #800000;">"</span><span style="color: #000000;">
    };

    myAlertView.AddButton(</span><span style="color: #800000;">"</span><span style="color: #800000;">Cancel</span><span style="color: #800000;">"</span><span style="color: #000000;">);
    myAlertView.AddButton(</span><span style="color: #800000;">"</span><span style="color: #800000;">Ok</span><span style="color: #800000;">"</span><span style="color: #000000;">);
    myAlertView.AddSubview(tf);
    </span><span style="color: #008000;">//</span><span style="color: #008000;"> More Setup Goes Here</span><span style="color: #008000;">
</span><span style="color: #000000;">    myAlertView.Show ();
}</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>The method starts by instantiating a UITextField control with a bounding rectangle passed via its constructor.&#160; The rectangle itself is constructed with four parameters via its constructor: the first two parameters set the x and y offset from the origin point of the control, and the last two parameters set the size of the drawing area.&#160; After the initial construction of the UITextField, a few additional properties are set to customize the display.&#160; </p>
<p>Among the properties set is the <em>SecureTextEntry</em>.&#160; Setting this property to true will make the text field act like a password field and hide all the characters that you’ve entered.&#160; Once the text field has been created and initialized, we move on to creating a UIAlertView.&#160; Via object initialization, the <em>Title</em> and <em>Message</em> properties are set with some text.&#160; Finally, two buttons are created, and the text field is added as a sub-view to the UIAlertView.&#160; Calling the show on the UIAlertView causes the alert to pop up.&#160; Below you can see the rendered control.</p>
<p><a href="http://blog.kevfoo.com/wp-content/uploads/2009/11/TextField_As_Subview_UIAlertView.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="TextField_As_Subview_UIAlertView" border="0" alt="TextField_As_Subview_UIAlertView" src="http://blog.kevfoo.com/wp-content/uploads/2009/11/TextField_As_Subview_UIAlertView_thumb.png" width="244" height="122" /></a></p>
<p>So now that we have the basic control setup, we can tweak it so that the text field and the message label can both be displayed.</p>
<p>If you recall our custom UIAlertView control is currently composed of two UILabels, two UIButtons and a UITextField that we added.&#160; The UILabels are derived from UIView and is not a subclass of UIControl; whereas, the UIButton and the UITextField are both derived from UIControls.&#160; Since we want to position the UITextField beneath the labels, we can use this knowledge to selectively shift only the UIControls in the view down leaving the title and message labels in place.</p>
<p>To accomplish this task the following steps need to be performed:</p>
<p>1) The control height needs to be increased to make space for the text field and provide additional space to move the UIControls.&#160; This is done by setting the frame to a larger size.&#160; The frame will be increased by the height of the text field plus a buffer, so the control has space between it and the others. </p>
<p>This is what the frame looks like after being enlarged: </p>
<p><a href="http://blog.kevfoo.com/wp-content/uploads/2009/11/FrameEnlarged_CustomUIAlertView.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="FrameEnlarged_CustomUIAlertView" border="0" alt="FrameEnlarged_CustomUIAlertView" src="http://blog.kevfoo.com/wp-content/uploads/2009/11/FrameEnlarged_CustomUIAlertView_thumb.png" width="244" height="153" /></a>&#160;
<p>
  <br />2) Once the frame has been enlarged, we’ll loop through the sub-views looking for UIControls and adjust only those types down by the same text field plus buffer offset </p>
<p>Here is what the control looks like after each UIControl is found during the iteration through the sub-views. </p>
<p><a href="http://blog.kevfoo.com/wp-content/uploads/2009/11/FirstUIControlShifted_CancelButton.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="FirstUIControlShifted_CancelButton" border="0" alt="FirstUIControlShifted_CancelButton" src="http://blog.kevfoo.com/wp-content/uploads/2009/11/FirstUIControlShifted_CancelButton_thumb.png" width="244" height="153" /></a><a href="http://blog.kevfoo.com/wp-content/uploads/2009/11/SecondUIControlShifted_OkButton.png"><br />
    <br /><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="SecondUIControlShifted_OkButton" border="0" alt="SecondUIControlShifted_OkButton" src="http://blog.kevfoo.com/wp-content/uploads/2009/11/SecondUIControlShifted_OkButton_thumb.png" width="244" height="153" /></a> </p>
<p><a href="http://blog.kevfoo.com/wp-content/uploads/2009/11/FinalUIControlShifted_TextField.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="FinalUIControlShifted_TextField" border="0" alt="FinalUIControlShifted_TextField" src="http://blog.kevfoo.com/wp-content/uploads/2009/11/FinalUIControlShifted_TextField_thumb.png" width="244" height="154" /></a></p>
<p>Here is the code that does the control adjustment:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:ad10f1fa-b7f3-477a-8553-a24998ed586e" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> TextFieldAlertView : UIAlertView
{
    </span><span style="color: #0000FF;">private</span><span style="color: #000000;"> UITextField _tf;

    </span><span style="color: #008000;">//</span><span style="color: #008000;"> ... </span><span style="color: #008000;">
</span><span style="color: #000000;">
    </span><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> AdjustControlSize()
    {
        </span><span style="color: #0000FF;">float</span><span style="color: #000000;"> tfExtH </span><span style="color: #000000;">=</span><span style="color: #000000;"> _tf.Frame.Size.Height </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800080;">16.0f</span><span style="color: #000000;">;

        var frame </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> RectangleF(</span><span style="color: #0000FF;">this</span><span style="color: #000000;">.Frame.X,
                                    </span><span style="color: #0000FF;">this</span><span style="color: #000000;">.Frame.Y </span><span style="color: #000000;">-</span><span style="color: #000000;"> tfExtH</span><span style="color: #000000;">/</span><span style="color: #800080;">2</span><span style="color: #000000;">,
                                    </span><span style="color: #0000FF;">this</span><span style="color: #000000;">.Frame.Size.Width,
                                    </span><span style="color: #0000FF;">this</span><span style="color: #000000;">.Frame.Size.Height </span><span style="color: #000000;">+</span><span style="color: #000000;"> tfExtH);

        </span><span style="color: #0000FF;">this</span><span style="color: #000000;">.Frame </span><span style="color: #000000;">=</span><span style="color: #000000;"> frame;

        </span><span style="color: #0000FF;">foreach</span><span style="color: #000000;">(var view </span><span style="color: #0000FF;">in</span><span style="color: #000000;"> </span><span style="color: #0000FF;">this</span><span style="color: #000000;">.Subviews)
        {
            </span><span style="color: #0000FF;">if</span><span style="color: #000000;">(view </span><span style="color: #0000FF;">is</span><span style="color: #000000;"> UIControl)
            {
                view.Frame </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> RectangleF(view.Frame.X,
                                            view.Frame.Y </span><span style="color: #000000;">+</span><span style="color: #000000;"> tfExtH,
                                            view.Frame.Size.Width,
                                            view.Frame.Size.Height);
            }
        }
    }
}</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>So now that the desired look and feel of the control has been established, it is time to wire up the control.&#160; There are a couple options for handling events generated by the control: one is more in line with how Cocoa handles events, and another that is similar to how .Net works.&#160; </p>
<p>The Cocoa way to wire up delegates involves subclassing a special delegate class associated to the control and selectively overriding the methods for the actions you want to customize.&#160; In the case of the UIAlertView control, that delegate class is a <a href="http://www.go-mono.com/docs/index.aspx?link=C%3AMonoTouch.UIKit.UIAlertViewDelegate">UIAlertViewDelegate</a>.&#160; The delegate class includes overridable methods like <em>Clicked</em> where you can define the actions to take when a button on the control is clicked or where you can extend behaviors by overriding methods like <em>Preseneted</em> which is called after the control has been displayed to the user.</p>
<p>The .Net way to wire up events is to provide specific delegates for specific events.&#160; To make interacting with the Cocoa Touch controls easier, Monotouch provides public events for each one of the methods that can be overridden in the UIAlertViewDelegate class.&#160; Having the individual public events makes wiring up controls more intuitive for the .Net developer, but it is good to know about the Cocoa-style approach especially when looking at Objective-C examples and/or ADC docs.&#160; I have examples of wiring up the control via both methods in the example source.</p>
<p>The last topic I’d like to cover briefly is how I encapsulated the customization of control by subclassing UIAlertView.&#160; The key to getting the control to look right is to override the LayoutSubviews method and build out the text field, add it to the UIAlertView and shift the controls around there.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:8d5d040c-523d-4749-9da5-93a758fb8e3a" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">override</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> LayoutSubviews ()
{
    </span><span style="color: #008000;">//</span><span style="color: #008000;"> layout the stock UIAlertView</span><span style="color: #008000;">
</span><span style="color: #000000;">    </span><span style="color: #0000FF;">base</span><span style="color: #000000;">.LayoutSubviews ();

    </span><span style="color: #008000;">//</span><span style="color: #008000;"> build out the text field</span><span style="color: #008000;">
</span><span style="color: #000000;">    _tf </span><span style="color: #000000;">=</span><span style="color: #000000;"> ComposeTextFieldControl(_secureTextEntry);

    </span><span style="color: #008000;">//</span><span style="color: #008000;"> add the text field to the UIAlertView</span><span style="color: #008000;">
</span><span style="color: #000000;">    </span><span style="color: #0000FF;">this</span><span style="color: #000000;">.AddSubview(_tf);

    </span><span style="color: #008000;">//</span><span style="color: #008000;"> shift the UIControls to fit the text field</span><span style="color: #008000;">
</span><span style="color: #000000;">    AdjustControlSize();
}</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>I’ve added some more customizations to my subclassed UIAlertView control that allows you to enable the text field security via a constructor parameter and a tweak to the control’s Transform property to shift the control up so it isn’t hidden by the keyboard.&#160; You can see those changes and the entire working example <a href="http://github.com/kevinmcmahon/CustomUITextFieldAlertView">here on github</a>.</p>
<p>Enjoy.</p>
<p>Links to some of the resources used: </p>
<ul>
<li><a href="http://iphonedevelopment.blogspot.com/2009/02/alert-view-with-prompt.html">Alert View with Prompt (iPhone Development Blog)</a> </li>
<li><a href="http://junecloud.com/journal/code/displaying-a-password-or-text-entry-prompt-on-the-iphone.html">Displaying a password or text entry prompt on the iPhone (Junecode Blog)</a> </li>
<li><a href="http://codesofa.com/blog/archive/2009/07/15/look-uialertview-is-dating-uitableview.html">Look UIAlertView is Dating UITableView (codesofa)</a> </li>
<li><a href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIAlertViewDelegate_Protocol/UIAlertViewDelegate/UIAlertViewDelegate.html">iPhone Dev Center: UIAlertViewDelegate Protocol Reference (Apple, <em>login required</em>)</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevfoo.com/index.php/2009/11/monotouch-uialertview-uitextfield-crazy-delicious/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fun with Monotouch and Multi-Level Table Views without Interface Builder</title>
		<link>http://blog.kevfoo.com/index.php/2009/11/fun-with-monotouch-and-multi-level-table-views-without-interface-builder/</link>
		<comments>http://blog.kevfoo.com/index.php/2009/11/fun-with-monotouch-and-multi-level-table-views-without-interface-builder/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 21:36:00 +0000</pubDate>
		<dc:creator>Kevin McMahon</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[UITableView]]></category>
		<category><![CDATA[UITableViewController]]></category>
		<category><![CDATA[cocoa touch]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[monotouch]]></category>
		<category><![CDATA[Adc]]></category>
		<category><![CDATA[App Development]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Craig Dunn]]></category>
		<category><![CDATA[Data Visualization]]></category>
		<category><![CDATA[Detail View]]></category>
		<category><![CDATA[Example Tutorials]]></category>
		<category><![CDATA[Interface Builder]]></category>
		<category><![CDATA[Mac Mini]]></category>
		<category><![CDATA[Monospace]]></category>
		<category><![CDATA[Navigation Button]]></category>
		<category><![CDATA[New Mac]]></category>
		<category><![CDATA[Pdc]]></category>
		<category><![CDATA[Perfect Time]]></category>
		<category><![CDATA[Programming Guide]]></category>
		<category><![CDATA[Roget]]></category>
		<category><![CDATA[Rss Reader]]></category>
		<category><![CDATA[Thesaurus]]></category>
		<category><![CDATA[Ugly Code]]></category>

		<guid isPermaLink="false">http://blog.kevfoo.com/index.php/2009/11/fun-with-monotouch-and-multi-level-table-views-without-interface-builder/</guid>
		<description><![CDATA[With the recent release of&#160; Monotouch, which enabled development for the iPhone/iPod Touch platform using C# and .Net, it seemed like the perfect time to take a swing at mobile app development.&#160; The strong appeal of being able to leverage my C# and .Net experience while scratching an itch that I have had for a [...]]]></description>
			<content:encoded><![CDATA[<p>With the recent release of&#160; <a href="http://monotouch.net/">Monotouch</a>, which enabled development for the iPhone/iPod Touch platform using C# and .Net, it seemed like the perfect time to take a swing at mobile app development.&#160; The strong appeal of being able to leverage my C# and .Net experience while scratching an itch that I have had for a few apps was more than enough to entice me to order a brand new <a href="http://www.amazon.com/gp/product/B002QQ8CC4?ie=UTF8&amp;tag=kev02-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B002QQ8CC4">Mac mini</a><img style="border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important" border="0" alt="" src="http://www.assoc-amazon.com/e/ir?t=kev02-20&amp;l=as2&amp;o=1&amp;a=B002QQ8CC4" width="1" height="1" /> and start learning the Cocoa framework.</p>
<p>My pet app project requires some pretty basic multi-level tabular data visualization, so that was the first thing I attempted to tackle.&#160; I started my learning endeavor by reading the <a href="http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/Introduction/Introduction.html">view controller programming guide</a> from <a href="http://developer.apple.com">Apple’s ADC</a> and working through a few of the <a href="http://monotouch.net/Tutorials">tutorials</a> listed on the Monotouch site.&#160; One of the example tutorials listed was for <a href="http://www.alexyork.net/blog/post/UINavigationController-with-MonoTouch-Building-a-simple-RSS-reader-Part-1.aspx">a basic RSS reader</a>.&#160; Armed with his guide, I got up and running with a basic table view allowed me to drill down one level deep and return to the root via navigation button.&#160; This was a great introduction and the easy to follow steps combined with the screenshots certainly hit the mark; however, this was not quite the layout I was looking for.</p>
<p>The data that I wanted to display calls for more than just a list-view-to-detail-view relationship that the RSS reader implemented.&#160; As a beginner trying to figure out how to wire up my custom table controllers to each other and the navigation controller all via Interface Builder resulted in a lot of thrashing and a lot of ugly code.&#160; I eventually was able to roughly approximate the behavior I wanted, but it was pretty obvious to me there had to be a better way.</p>
<p>I set out to see if I could find more Monotouch examples to see if I could pick up some tips and stumbled across <a href="http://conceptdev.blogspot.com/">Craig Dunn’s blog</a>.&#160; Craig not only put together apps for the Monospace and PDC conferences (and graciously provided the source) but also posted a <a href="http://conceptdev.blogspot.com/2009/10/monotouch-rogets-1911-thesaurus.html">Roget’s Thesaurus</a> app that was just what I was looking for.&#160; It was a simple app, but it had all the elements in play that I was looking for and an <a href="http://3.bp.blogspot.com/_Ba76y6K7kvs/Su66_wEzO3I/AAAAAAAABIQ/9MzCAwYQ-HQ/s1600-h/RogetPlacemat.png">incredible diagram</a> that tied it all together.</p>
<p>One of the key tips and tricks I picked up from Craig’s code was how easy it was to cut out the Interface Builder from the process.&#160; I also generally tend to avoid using the designer whenever possible in Visual Studio but here it was a key factor in my understand.&#160; This isn’t to say that I’d never use the Interface Builder again or that it doesn’t have its uses because it does but there was <em>too much</em> magic going on in how Monotouch links up the XIBs to their backing C# classes.&#160; It wasn’t until I started explicitly creating views and view controllers instead of trying to wire them up after the fact did I start to understand how things were supposed to interact.</p>
<p>To implement a custom <strong>UITableViewController</strong> you need to set two properties with custom classes and override a method which is invoked by the framework when the view controller is loaded.&#160; You’ll need to set the TableDelegate and DataSource properties on the controller with your own implementations of <strong>UITableViewDelegate </strong>and&#160; <strong>UITableViewDataSource</strong>.&#160; The implementation of the table delegate allows you to customize how the table will respond to certain events and the data source implementation provides not only the data the table uses but also how that data is to be displayed within the table.&#160; Typically the ViewDidLoad method is overriden to perform the view setup work needed during initialization of the view controller.&#160; Within the method the TableDelegate and DataSource properties can be set.</p>
<p>Example setting the TableDelegate and DataSource via the ViewDidLoad method:</p>
</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:18bc747e-a016-49a3-889d-2df3afb9f710" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;overflow: auto;"><span style="color: #0000FF;">namespace</span><span style="color: #000000;"> MultiLevelTableView
{
    [MonoTouch.Foundation.Register(</span><span style="color: #800000;">"</span><span style="color: #800000;">RootViewController</span><span style="color: #800000;">"</span><span style="color: #000000;">)]
    </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">partial</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> RootViewController : UITableViewController
    {
        </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> DataSource : UITableViewDataSource { </span><span style="color: #008000;">/*</span><span style="color: #008000;"> Impl Here </span><span style="color: #008000;">*/</span><span style="color: #000000;"> }

        </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> TableDelegate : UITableViewDelegate { </span><span style="color: #008000;">/*</span><span style="color: #008000;"> Impl Here </span><span style="color: #008000;">*/</span><span style="color: #000000;"> }

        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">override</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> ViewDidLoad ()
        {
            </span><span style="color: #0000FF;">base</span><span style="color: #000000;">.ViewDidLoad ();

            TableView.Delegate </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> TableDelegate (</span><span style="color: #0000FF;">this</span><span style="color: #000000;">);
            TableView.DataSource </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> DataSource (</span><span style="color: #0000FF;">this</span><span style="color: #000000;">);
        }
    }
}</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p>
<p>Example setting the properties during <strong>UITableView</strong> construction:</p>
</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:ac5c342a-bdfc-49a2-89b8-5da3f272da4f" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;overflow: auto;"><span style="color: #0000FF;">namespace</span><span style="color: #000000;"> MultiLevelTableView
{
    [MonoTouch.Foundation.Register(</span><span style="color: #800000;">"</span><span style="color: #800000;">RootViewController</span><span style="color: #800000;">"</span><span style="color: #000000;">)]
    </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">partial</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> RootViewController : UITableViewController
    {
        UITableView tableView;

        </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> DataSource : UITableViewDataSource { </span><span style="color: #008000;">/*</span><span style="color: #008000;"> Impl Here </span><span style="color: #008000;">*/</span><span style="color: #000000;"> }

        </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> TableDelegate : UITableViewDelegate { </span><span style="color: #008000;">/*</span><span style="color: #008000;"> Impl Here </span><span style="color: #008000;">*/</span><span style="color: #000000;"> }

        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">override</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> ViewDidLoad ()
        {
            </span><span style="color: #0000FF;">base</span><span style="color: #000000;">.ViewDidLoad ();

            tableView </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> UITableView()
            {
                Delegate </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> TableViewDelegate(</span><span style="color: #0000FF;">this</span><span style="color: #000000;">),
                DataSource </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> TableViewDataSource(</span><span style="color: #0000FF;">this</span><span style="color: #000000;">),
            };

            </span><span style="color: #008000;">//</span><span style="color: #008000;">You can set more properties here like size and
            </span><span style="color: #008000;">//</span><span style="color: #008000;">location in the frame etc.</span><span style="color: #008000;">
</span><span style="color: #000000;">
            </span><span style="color: #0000FF;">this</span><span style="color: #000000;">.View.AddSubview(tableView);
        }
    }
}</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p>
<p>The meat of the table view controller falls in the implementations of the DataSource and TableDelegate.</p>
<p>A basic DataSource setup involves overriding two methods used by parent controller.&#160; The RowsInSection method tells how many rows need to be displayed in the table and the GetCell method returns a cell view which was customized for display by setting the text and display properties.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:c5c83938-3d1d-47b9-8e66-91d91b0673c8" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><span style="color: #0000FF;">class</span><span style="color: #000000;"> DataSource : UITableViewDataSource
{
    </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> NSString kCellIdentifier </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> NSString (</span><span style="color: #800000;">"</span><span style="color: #800000;">MyIdentifier</span><span style="color: #800000;">"</span><span style="color: #000000;">);
    RootViewController tvc;

    </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> DataSource (RootViewController tvc)
    {
        </span><span style="color: #0000FF;">this</span><span style="color: #000000;">.tvc </span><span style="color: #000000;">=</span><span style="color: #000000;"> tvc;
    }

    </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">override</span><span style="color: #000000;"> </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> RowsInSection (UITableView tableView, </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> section)
    {
        </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> tvc.RootData.Count;
    }

    </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">override</span><span style="color: #000000;"> UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
    {
        var cell </span><span style="color: #000000;">=</span><span style="color: #000000;"> tableView.DequeueReusableCell (kCellIdentifier);

        </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (cell </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">)
        {
            cell </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> UITableViewCell (UITableViewCellStyle.Default, kCellIdentifier);
        }

        cell.TextLabel.Text </span><span style="color: #000000;">=</span><span style="color: #000000;"> tvc.RootData.ElementAt(indexPath.Row);
        cell.Accessory </span><span style="color: #000000;">=</span><span style="color: #000000;"> UITableViewCellAccessory.DetailDisclosureButton;
        </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> cell;
    }
}</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>The TableDelegate is where the behavior of the table to various events is defined.&#160; It is here in which we load up the next view to display when a user clicks on a cell.&#160;&#160; A basic implementation of a table view delegate involves overriding the RowSelected method with instructions on what to do with the row now that it has been selected.&#160; If the node selected happened to be a leaf node for example we might load up the detail’s view to display the nodes properties or if the node was the parent of more child nodes we would load another list view to continue to drill down into the data.&#160; In our case we want to drill down to the next layer of data which is managed by the SubGroupViewController.</p>
</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:598700d1-088c-449d-9ed0-f36c3bab6d9e" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><span style="color: #0000FF;">class</span><span style="color: #000000;"> TableDelegate : UITableViewDelegate
{
    RootViewController tvc;
    SubGroupViewController sgvc;

    </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> TableDelegate (RootViewController tvc)
    {
        </span><span style="color: #0000FF;">this</span><span style="color: #000000;">.tvc </span><span style="color: #000000;">=</span><span style="color: #000000;"> tvc;
    }

    </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">override</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> RowSelected (UITableView tableView, NSIndexPath indexPath)
    {
        </span><span style="color: #008000;">//</span><span style="color: #008000;"> get info from selected row</span><span style="color: #008000;">
</span><span style="color: #000000;">        </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> selectedGroup </span><span style="color: #000000;">=</span><span style="color: #000000;"> tvc.RootData.ElementAt(indexPath.Row);

        </span><span style="color: #008000;">//</span><span style="color: #008000;"> load up new controller to display</span><span style="color: #008000;">
</span><span style="color: #000000;">        </span><span style="color: #0000FF;">if</span><span style="color: #000000;">(sgvc </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">)
            sgvc </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> SubGroupViewController(selectedGroup);

        </span><span style="color: #008000;">//</span><span style="color: #008000;"> push the controller on the navigation stack</span><span style="color: #008000;">
</span><span style="color: #000000;">        tvc.NavigationController.PushViewController(sgvc, </span><span style="color: #0000FF;">true</span><span style="color: #000000;">);
    }
}</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p>
<p>The hang up for me with using Interface Builder to try and get the multi-level table views wired together was mostly due to not being familiar with the objects I was dealing with and not understanding what properties are needed to be initialized so the framework can display them correctly.&#160; Approaching the problem via the Interface Builder created a lot of noise that made seeing what was really needed to wire these table view controllers with the navigation controller difficult.&#160; In this case the the pre-packaged templates and generic layouts provided by Monotouch and Interface Builder were more of a hindrance than help but that is to be expected while learning a new technology.</p>
<p>I’ve packaged up my <a href="http://github.com/kevinmcmahon/MultiLevelTableView">implementation of a multi-level table view</a> app and put it on github.&#160; If anyone is looking for straight-forward, simple example of nesting table views hopefully this will help.</p>
<p>I also recommend checking out the following links which helped me immensely:</p>
<ul>
<li><a href="http://www.alexyork.net/blog/category/MonoTouch.aspx">Alex York&#8217;s Monotouch posts including the RSS reader</a>&#160; </li>
<li><a href="http://sabonrai.wordpress.com/2009/08/28/monotouch-sample-code-uitableview/">Sabon Rai&#8217;s Sample Code for UITableView</a> </li>
<li><a href="http://conceptdev.blogspot.com/">Craig Dunn’s Blog</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevfoo.com/index.php/2009/11/fun-with-monotouch-and-multi-level-table-views-without-interface-builder/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
