<?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>Jeffrey Sambells &#187; User Interface</title>
	<atom:link href="http://jeffreysambells.com/category/user-interface/feed/" rel="self" type="application/rss+xml" />
	<link>http://jeffreysambells.com</link>
	<description>Geek out AFK</description>
	<lastBuildDate>Mon, 14 May 2012 16:04:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>&#9734; More on Bloat</title>
		<link>http://jeffreysambells.com/posts/2012/03/19/more-on-bloat/</link>
		<comments>http://jeffreysambells.com/posts/2012/03/19/more-on-bloat/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 14:27:06 +0000</pubDate>
		<dc:creator>Jeffrey Sambells</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Resolutions]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[XCode]]></category>

		<guid isPermaLink="false">http://jeffreysambells.com/?p=1615</guid>
		<description><![CDATA[The other day I talked about the retina display bloat and using vectors to vastly decrease the distribution size of your iOS apps. The drawback however was that it only work for image that can be vectorized. So what about the rest of your images like photos or the default screens? Well, it turns out [...]<p><a href="http://jeffreysambells.com/posts/2012/03/19/more-on-bloat/">&#9734; Permalink</a></p>]]></description>
			<content:encoded><![CDATA[<p>The other day I talked about the retina display bloat and <a href="http://jeffreysambells.com/posts/2012/03/02/beating-the-20mb-size-limit-ipad-retina-displays/">using vectors to vastly decrease the distribution size of your iOS apps</a>. The drawback however was that it only work for image that can be vectorized. So what about the rest of your images like photos or the default screens?</p>

<p>Well, it turns out that the built-in Xcode PNG compression tool kinda lacks in the compression department. There&#8217;s a <a href="http://imageoptim.com/tweetbot.html">great case study</a> about the Tweetbot app over on the ImageOptimum site:</p>

<blockquote>
  <p>Disabling Xcode conversion and simply using ImageOptim instead was enough to reduce the application size by almost 30% (33.4MB down to 23.8MB) and halve initial display time.</p>
  
  <p>Manually optimizing images with ImageAlpha reduced entire application size by more than a half (33.4MB down to 16.3MB). Images alone were 65% smaller and were displayed 2.5 times quicker than Xcode-optimized ones.</p>
</blockquote>

<p>Now that&#8217;s awesome. If a few clicks can save you megabytes why not?</p>

<p>It turns out that Xcode creates a CgBI PNG varient optimized for loading speed using 32-bit BGRA. Jeff LaMarche has <a href="http://iphonedevelopment.blogspot.ca/2008/10/iphone-optimized-pngs.html">a great technical explanation</a> of what&#8217;s going on, explaining that Xcode basically optimizes for loading speed by swapping bytes in the image and &#8220;corrupting&#8221; the PNG format.</p>

<blockquote>
  <p>During the build, Xcode basically screws up your PNG image, turning it into something that&#8217;s technically no longer a PNG image. Xcode doesn&#8217;t change your original file, but when it copies it to the Resources folder of your application bundle, what it does is it byte-swaps the red and blue octets and also &#8220;premultiplies the alpha&#8221; &#8230; The PNG specification does not support either of these changes</p>
</blockquote>

<p>The other downside is that sometimes this manipulation results in a <em>larger</em> file size than you would have with a normally optimized PNG.</p>

<p>To disable Xcode&#8217;s built in image compression, go to your target&#8217;s build settings, filter for &#8220;Compress PNG Files&#8221; and select NO.</p>

<p>However, be cautious if you choose to disable Xcode&#8217;s built-in PNG optimization and do the optimization yourself with a tool like <a href="http://imageoptim.com/">ImageOptimum</a>. Disabling Xcode&#8217;s optimization will mean your iDevice will do the equivalent optimization on-the-fly at run-time, adding additional processing and memory overhead. You should to take this into consideration and optimize your code to share and reuse image resources where possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeffreysambells.com/posts/2012/03/19/more-on-bloat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#9734; fun.js [Updated]</title>
		<link>http://jeffreysambells.com/posts/2012/01/15/fun-js/</link>
		<comments>http://jeffreysambells.com/posts/2012/01/15/fun-js/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 15:13:54 +0000</pubDate>
		<dc:creator>Jeffrey Sambells</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Snippet]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://jeffreysambells.com/?p=1405</guid>
		<description><![CDATA[There&#8217;s been a plethora of great little JavaScripts coming out lately. I&#8217;ve been collecting a few of them to use on various projects so I though I&#8217;d make a list (yes! a list!) and share what I&#8217;ve found. I haven&#8217;t included any big all encompassing libraries since I assume you already know about jQuery and [...]<p><a href="http://jeffreysambells.com/posts/2012/01/15/fun-js/">&#9734; Permalink</a></p>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s been a plethora of great little JavaScripts coming out lately. I&#8217;ve been collecting a few of them to use on various projects so I though I&#8217;d make a list (yes! a list!) and share what I&#8217;ve found. I haven&#8217;t included any big all encompassing libraries since I assume you already know about <a href="http://jquery.com">jQuery</a> and the rest.</p>

<h2><a href="http://www.modernizr.com/">modernizer.js</a></h2>

<p>If you&#8217;re working with HTML5 and CSS3&#8211;and you should be&#8211;you&#8217;re probably wasting a lot of time if you&#8217;re not using <a href="http://www.modernizr.com/">Modernizer</a>. Modernizer gives you a quick and easy way to check exactly what browser or device features your visitors use using. I&#8217;d suggest reading <a href="http://www.alistapart.com/articles/taking-advantage-of-html5-and-css3-with-modernizr/">Taking Advantage of HTML5 and CSS3 with Modernizr</a> or <a href="http://webdesignernotebook.com/css/how-to-use-modernizr/">How to use Modernizr</a> and the <a href="http://www.modernizr.com/docs/">check out the documentation</a>.</p>

<h2><a href="http://filamentgroup.com/lab/respondjs_fast_css3_media_queries_for_internet_explorer_6_8_and_more/">respond.js</a></h2>

<p>Respond provides faster css3 media queries for internet explorer 6+. This will help you out when you&#8217;re following your <a href="http://www.abookapart.com/products/mobile-first">mobile first</a> <a href="http://www.alistapart.com/articles/responsive-web-design/">responsive design</a> techniques (you&#8217;re doing that too right? right?). Get the <a href="https://github.com/scottjehl/Respond">source here on GitHub</a> and then check out <a href="https://github.com/scottjehl/Respond#readme">the documentation</a>.</p>

<h2><a href="http://yepnopejs.com/">yepnope.js</a></h2>

<p>yepnope is a nice little script loader but I&#8217;d only recommend using it if you have a lot of scripts and each one is rarely used. A much better idea is to combine all your JavaScript&#8217;s into one compressed file so that you only need one http request to download everything (especially on mobile devices).</p>

<h2><a href="https://github.com/bartaz/impress.js">impress.js</a></h2>

<p>While impress may not help improve your site, this CSS3 powered interactive presentation tool will definitely help make client pitches rock. But, what about (Prezi)[prezi.com] you say? Go <a href="http://bartaz.github.com/impress.js">try the impress demo</a>. You&#8217;ll understand why it&#8217;s called &#8220;impress&#8221; (though I have a soft spot for <a href="http://vimeo.com/channels/kinetictypography">kinetic typography</a>). For another example and some excellent reading check out <a href="http://johnpolacek.github.com/WhatTheHeckIsResponsiveWebDesign-impressjs/">What The Heck Is Responsive Web Design</a>.</p>

<h2><a href="http://fgnass.github.com/spin.js/">spin.js</a></h2>

<p>Now here&#8217;s a great idea. How often do you need a nice little &#8220;spinner&#8221; loading animation? Gifs are so last decade so try this configurable, cross-browser JavaScript spinner with no images! Set a few properties and you&#8217;ll be loading in no time.</p>

<h2><a href="http://videojs.com/">video.js</a></h2>

<p>Again with the HTML5 scripts but now focused on video. You may or may not agree with <a href="http://www.apple.com/hotnews/thoughts-on-flash/">thoughts on flash</a> but you&#8217;ll probably like this impressive HTML5 video player. <a href="http://videojs.com/docs/">Drop it into</a> your <strike>simple</strike> html5 video markup and you&#8217;ll get a nice cross-browser ui&#8211;with a fallback to Flash just in case.</p>

<h2><a href="http://gildas-lormeau.github.com/zip.js/">zip.js</a></h2>

<p>A JavaScript library to zip and unzip files. Now you can confuse non-savvy computer users right in teh browser!</p>

<h2><a href="http://meltingice.github.com/psd.js/">psd.js</a></h2>

<p>Parse the Adobe Photoshop PSD files right in your browser. NOt sure what I&#8217;d do with it but it&#8217;s pretty neat. Drop a psd on <a href="http://meltingice.github.com/psd.js/">the demo page</a> and you&#8217;ll get a lit of all the layers in the file.</p>

<h2><a href="http://lab.hakim.se/zoom-js/">zoom.js</a></h2>

<p>zoom.js is a just an early experiment that allow you to quickly zoom in on DOM elements or points on a page. For example, click on any element on the <a href="http://lab.hakim.se/zoom-js/">demo page</a> to zoom in.</p>

<h1>jQuery Plugins</h1>

<p>Here&#8217;s a few more that are great but also require jQuery.</p>

<h2><a href="http://johnpolacek.github.com/scrollorama/">scrollorama.js</a></h2>

<p>Scrollorama is a fun plugin that helps you with &#8220;scrolly stuff&#8221; as the web site says. Scroll down <a href="http://johnpolacek.github.com/scrollorama/">the demo page</a> to see various example of transitions, pinning, parallax and more. But, remember, use this responsibly. Don&#8217;t make scrolling the <code>&lt;blink&gt;</code> tag of 2012.</p>

<h2><a href="http://letteringjs.com/">lettering.js</a></h2>

<p>I&#8217;m a bit of a typophile (yes, I know the current iteration of this blog design needs work) and I love tools that make web typography easier. Lettering provides fine grained control for properties like kerning, layout and more. The <a href="http://letteringjs.com/">gallery</a> on the site is better seen than described so after you&#8217;re impressed check out the <a href="https://github.com/davatron5000/Lettering.js/wiki">documentation here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeffreysambells.com/posts/2012/01/15/fun-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#9734; How to determine iOS device orientation when your app starts up.</title>
		<link>http://jeffreysambells.com/posts/2011/09/22/how-to-determine-ios-device-orientation-when-your-app-starts-up/</link>
		<comments>http://jeffreysambells.com/posts/2011/09/22/how-to-determine-ios-device-orientation-when-your-app-starts-up/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 03:18:51 +0000</pubDate>
		<dc:creator>Jeffrey Sambells</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[Snippet]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[XCode]]></category>

		<guid isPermaLink="false">http://jeffreysambells.com/?p=1295</guid>
		<description><![CDATA[I&#8217;ve been working on several iPad apps lately that require a loading screen to appear right after launch. All the apps are designed to work in any rotation so getting things to startup in the correct orientation has been a challenge because of some iOS &#8220;bugs&#8221; with device orientation at startup. After several attempts of [...]<p><a href="http://jeffreysambells.com/posts/2011/09/22/how-to-determine-ios-device-orientation-when-your-app-starts-up/">&#9734; Permalink</a></p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on several iPad apps lately that require a loading screen to appear right after launch. All the apps are designed to work in any rotation so getting things to startup in the correct orientation has been a challenge because of some <a href="http://openradar.appspot.com/7216046">iOS &#8220;bugs&#8221; with device orientation at startup</a>.</p>

<p>After several attempts of trial and error I believe the following is a foolproof solution for setting the correct orientation of the startup view for an iPad app (assuming the default view was design in portrait orientation). I thought I&#8217;d share it here for anyone else who is having a similar problem.</p>

<p>First, in <code>application:didFinishLaunchingWithOptions:</code> add the following:</p>

<pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];

   // The rest of your code...

}
</code></pre>

<p>then, on the view you want to rotate, check both interface and device orientation to properly position the view in all four orientations (plus laying flat on a table).</p>

<p>-(void)updateOrientation {</p>

<pre><code>    UIInterfaceOrientation iOrientation = [UIApplication sharedApplication].statusBarOrientation;
    UIDeviceOrientation dOrientation = [UIDevice currentDevice].orientation;

    bool landscape;

    if (dOrientation == UIDeviceOrientationUnknown || dOrientation == UIDeviceOrientationFaceUp || dOrientation == UIDeviceOrientationFaceDown) {
        // If the device is laying down, use the UIInterfaceOrientation based on the status bar.
        landscape = UIInterfaceOrientationIsLandscape(iOrientation);
    } else {
        // If the device is not laying down, use UIDeviceOrientation.
        landscape = UIDeviceOrientationIsLandscape(dOrientation);

        // There's a bug in iOS!!!! http://openradar.appspot.com/7216046
        // So values needs to be reversed for landscape!
        if (dOrientation == UIDeviceOrientationLandscapeLeft) iOrientation = UIInterfaceOrientationLandscapeRight;
        else if (dOrientation == UIDeviceOrientationLandscapeRight) iOrientation = UIInterfaceOrientationLandscapeLeft;

        else if (dOrientation == UIDeviceOrientationPortrait) iOrientation = UIInterfaceOrientationPortrait;
        else if (dOrientation == UIDeviceOrientationPortraitUpsideDown) iOrientation = UIInterfaceOrientationPortraitUpsideDown;
    }

    if (landscape) {
        // Do stuff for landscape mode.
    } else {
        // Do stuff for portrait mode.
    }

    // Now manually rotate the view if needed.
    switch (iOrientation) 
    {
        case UIInterfaceOrientationPortraitUpsideDown:
            [self rotate:180.0f];
            break;
        case UIInterfaceOrientationLandscapeRight:
            [self rotate:90.0f];
            break;
        case UIInterfaceOrientationLandscapeLeft:
            [self rotate:-90.0f];
            break;
        case UIInterfaceOrientationPortrait:
            break; //do nothing because it's fine
        default:
            break;
    }

    // Set the status bar to the right spot just in case
    [[UIApplication sharedApplication] setStatusBarOrientation:iOrientation];

}
</code></pre>

<p>Enjoy. If you found it useful or have an improvement, <a href="/contact">let me know</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeffreysambells.com/posts/2011/09/22/how-to-determine-ios-device-orientation-when-your-app-starts-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#9734; Project: iPad Kiosk</title>
		<link>http://jeffreysambells.com/posts/2010/09/11/project-ipad-kiosk/</link>
		<comments>http://jeffreysambells.com/posts/2010/09/11/project-ipad-kiosk/#comments</comments>
		<pubDate>Sat, 11 Sep 2010 14:00:58 +0000</pubDate>
		<dc:creator>Jeffrey Sambells</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://jeffreysambells.com/?p=773</guid>
		<description><![CDATA[Recently, I was discussing the possibility of using an iPad as a kiosk to interact with a new online service we&#8217;re developing. The idea is very interesting as the touch screen device would offer us a great user experience that most people could easily understand. After doing a little research it seems that it&#8217;s physically [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I was discussing the possibility of using an iPad as a kiosk to interact with a new online service we&#8217;re developing. The idea is very interesting as the touch screen device would offer us a great user experience that most people could easily understand. After doing a little research it seems that it&#8217;s physically easy to get an iPad into a kiosk but the problems are in the software, not the hardware.</p>

<p>Like the iPhone, the iPad has only one primary button on the front of the device and a few buttons on the sides (for volume and on/off). The logistics of a kiosk mean people shouldn&#8217;t be allowed to randomly quit the app so you have to disable the iPad buttons by jailbreaking&#8212;and installing the appropriate software&#8212;or by disabling them physically (by covering them up). For physical barriers, there are a number of existing products such as the nice looking <a href="http://www.beyondkiosks.com/product.php?id=64">Beyond Kiosks</a>, the more portable <a href="http://www.gravityswitch.com/ibracket/">iBracket</a> or simple DIY projects like this <a href="http://www.flickriver.com/photos/ymbiont/4487329902/">wooden kiosk stand</a>. I&#8217;m not sure how the wooden kiosk stand would hold up to abuse but, hardware aside, it comes down to the software problems.</p>

<p>To run successfully as a kiosk, the kiosk app needs to be the only app running on the device without the ability to exit the app in any way (at least without removing the iPad from its enclosure). The iPad doesn&#8217;t offer an easy way to force an app to stay open but you can be sneaky and do things like launching the app again whenever it happens to close:</p>

<pre><code>-(void)applicationWillTerminate:(UIApplication *)application {
    [application openURL:[NSURL URLWithString:@"mykioskapp://"]];
}
</code></pre>

<p>Note: Doing this would probably get an app rejected from the App Store.</p>

<p>Care must also be taken not to include any way for a user to accidentally jump into another application, such as the web browser or the email app. If someone gets out of the kiosk application they&#8217;ll probably be confused but, more importantly, they&#8217;ll be stuck with no way to get back because the only buttons that would return them to the kiosk application have been disabled or covered up.</p>

<p>The other software problem is dealing with the Apple App Store submission process. Running in a kiosk could initially be great since a kiosk app probably isn&#8217;t going to be distributed through the app store. Instead, it will be easily loaded on each kiosk directly. Both a development distribution or an over-the-air Ad-Hoc distribution would work but each come with their own problems. Anyone who has dealt with Ad-Hoc or development distributions knows that the certificate process isn&#8217;t fun and just when you think you have it sorted out, the provisioning profiles on the devices expire and you have to repeat the process. It would be great to bypass the burden of the Apple App Store rules and regulations but to do so someone will need to be on-site to update the app on a regular (monthly) basis as the development or Ad-Hoc distributions expire or the app itself needs updates.</p>

<p>The idea of an iPad kiosk is obviously possible and there are a few existing companies already using it for things such as <a href="http://mhkiosk.malaysiaairlines.com/">ticket sales</a> or <a href="http://www.pointabout.com/2010/07/09/new-disney-store-opens-with-pointabouts-destination-disney-ipad-kiosk-experience">product information</a>.  If I get any further into the project I&#8217;ll post some updates and let you know how it goes.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeffreysambells.com/posts/2010/09/11/project-ipad-kiosk/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>&#9734; Dissecting iPhone OS Touch Actions for Text</title>
		<link>http://jeffreysambells.com/posts/2010/04/30/dissecting-iphone-os-touch-actions-for-text/</link>
		<comments>http://jeffreysambells.com/posts/2010/04/30/dissecting-iphone-os-touch-actions-for-text/#comments</comments>
		<pubDate>Sat, 01 May 2010 01:41:18 +0000</pubDate>
		<dc:creator>Jeffrey Sambells</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[XCode]]></category>
		<category><![CDATA[UITextInput]]></category>

		<guid isPermaLink="false">http://jeffreysambells.com/?p=615</guid>
		<description><![CDATA[I&#8217;ve been working my way through a UiTextInput rich text editor implementation in iPhone OS 3.2 and thought I&#8217;d share some observations I&#8217;ve made regarding touch input related to text. One of the biggest hurdles with UiTextInput is that you don&#8217;t get the benefit of the great UI work that Apple has put in their [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working my way through a UiTextInput rich text editor implementation in iPhone OS 3.2 and thought I&#8217;d share some observations I&#8217;ve made regarding touch input related to text.</p>

<p>One of the biggest hurdles with UiTextInput is that you don&#8217;t get the benefit of the great UI work that Apple has put in their core iPhone text inputs. There&#8217;s no text selection, magnification loops, copy/paste or any of those other things we take for granted when we use the default inputs. If you want advanced editing features you have to implement them all yourself&#8212;and it&#8217;s a lot harder than it looks.</p>

<p>Text selection, for example, is something that you&#8217;re probably familiar with if you&#8217;ve used an iPhone or iPad but have you ever stopped to actually look what&#8217;s going on? The subtleties of the touch interaction are very intuitive but may not be what you expect when you think about it. For example, here are few things you may not have noticed when editing text in something like the default notepad.</p>

<ul>
<li><p>When you quickly single tap, the carat is placed in the text where you tapped but it&#8217;s position is based on word boundaries. A mouse click in a word processor places the carat at the point where you clicked but a tap in iPhone OS places it in front of or after the word, depending on which end of the word was nearest the tap.</p></li>
<li><p>Holding on a word will reveal a magnifying loop that gives you fine grained control over the selection. This is the <em>only</em> way you can place the carat within a word.</p></li>
<li><p>The select/select all/paste menu will appear if you long-tap. As a result it will always appear after the loop is shown but could also appear if you touch and release just before the loop shows (of course you&#8217;ll be selecting and pasting on a word boundary in the latter case).</p></li>
<li><p>The &#8220;select&#8221; option in the menu always starts by selecting a full word. Which word depends on where the carat is placed. If the carat is in a word then that word will be selected. If the carat is at the beginning of a word, between the space and the first letter, then the word following the carat is selected. If the carat is at the end of a word, before the following space, then the word preceding the carat is selected.</p></li>
<li><p>Double tapping a word will immediately select it. If you hold and drag on the second tap you can select a larger range based on where you drag. Interestingly, the range selection also has a magnifying loop&#8212;but with a different shape&#8212;so you can have fine grained control at the end of the selection.</p></li>
</ul>

<p>These are just a few of the subtle interactions that most iPhone users just do without thinking about.  If you&#8217;re going to implement your own UITextInput be sure to closely look at the existing text inputs and how you typically interact with them as you&#8217;ll need to implement yours the way users will expect it to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeffreysambells.com/posts/2010/04/30/dissecting-iphone-os-touch-actions-for-text/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>&#9734; Android TextView with Auto Sized Content</title>
		<link>http://jeffreysambells.com/posts/2010/04/04/android-textview-with-auto-sized-content/</link>
		<comments>http://jeffreysambells.com/posts/2010/04/04/android-textview-with-auto-sized-content/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 04:08:41 +0000</pubDate>
		<dc:creator>Jeffrey Sambells</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[TextView]]></category>

		<guid isPermaLink="false">http://jeffreysambells.com/?p=461</guid>
		<description><![CDATA[While working on an Android project lately I was looking for a solution to auto-size text in a TextView similar to the way the iPhone ADK allows you to select &#8220;fit text to box&#8221;. I couldn&#8217;t find any reference to something similar in the Android SDK so I had to roll my own TextView subclass. [...]]]></description>
			<content:encoded><![CDATA[<p>While working on an Android project lately I was looking for a solution to auto-size text in a <code>TextView</code> similar to the way the iPhone ADK allows you to select &#8220;fit text to box&#8221;. I couldn&#8217;t find any reference to something similar in the Android SDK so I had to roll my own <code>TextView</code> subclass.</p>

<p>Now all I have to do is call <code>setFitTextToBox(true)</code> on the <code>TextFitTextView</code> after allocation. Enjoy!</p>

<pre><code>public class TextFitTextView extends TextView {

    static final String TAG = "TextFitTextView";
    boolean fit = false;

    public TextFitTextView(Context context) {
        super(context);
    }

    public TextFitTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public TextFitTextView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    public void setFitTextToBox( Boolean fit ) {
        this.fit = fit;
    }

    protected void onDraw (Canvas canvas) {
        super.onDraw(canvas);
        if (fit) _shrinkToFit();
    }

    protected void _shrinkToFit() {

        int height = this.getHeight();
        int lines = this.getLineCount();
        Rect r = new Rect();
        int y1 = this.getLineBounds(0, r);
        int y2 = this.getLineBounds(lines-1, r);

        float size = this.getTextSize();
        if (y2 &gt; height &amp;&amp; size &gt;= 8.0f) {
            this.setTextSize(size - 2.0f);
            _shrinkToFit();
        }

    }
}
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://jeffreysambells.com/posts/2010/04/04/android-textview-with-auto-sized-content/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>&#9734; Swyping</title>
		<link>http://jeffreysambells.com/posts/2009/11/23/swyping/</link>
		<comments>http://jeffreysambells.com/posts/2009/11/23/swyping/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 04:51:11 +0000</pubDate>
		<dc:creator>Jeffrey Sambells</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://jeffreysambells.com/?p=420</guid>
		<description><![CDATA[Techcrunch has released an interesting video showing off a new way to type&#8211;or should I say &#8220;swype&#8221;&#8211;on a touchscreen phone. The basic premiss is that instead of lifting your finger to &#8220;tap&#8221; a letter, you simply slide your finger around the screen and the device will guess what word you mean. It&#8217;s similar to the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.techcrunch.com/2009/11/23/swype-iphone-leaked-video-android/">Techcrunch has released</a> an interesting video showing off a new way to type&#8211;or should I say &#8220;swype&#8221;&#8211;on a touchscreen phone. The basic premiss is that instead of lifting your finger to &#8220;tap&#8221; a letter, you simply slide your finger around the screen and the device will guess what word you mean. It&#8217;s similar to the <a href="http://www.youtube.com/watch?v=6hcoT6yxFoU">often funny</a> T9 predictive typing technology used on most mobile phones.</p>

<p>Sounds interesting but based on the video below I&#8217;m not really impressed. First, the comparison to typing on the iPhone isn&#8217;t that great. Following along on my iPhone I could easily punch out the message just as fast as the Swyping user. Secondly, there seems to be a lot of pausing in the output on the Swyping display. I can see this leading to situations where you stop to think and end up forgetting where you were in a word or loosing your train of thought. I could also see a lot of situations where you&#8217;re back &#8220;swyping&#8221; to edit what was entered a few words ago since it guessed wrong (though the <a href="http://twitter.com/iamamused/status/5954552088">iPhone isn&#8217;t much better</a> in that regard).</p>

<p>I haven&#8217;t tried it myself so maybe it&#8217;ll surprise me but at the moment it just looks awkward. See for yourself:</p>

<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/pTooBnKAdSw&amp;hl=en_US&amp;fs=1&amp;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/pTooBnKAdSw&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://jeffreysambells.com/posts/2009/11/23/swyping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

