<?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>le accidental occurrence &#187; iphone</title>
	<atom:link href="http://blog.42at.com/tag/iphone/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.42at.com</link>
	<description>42at</description>
	<lastBuildDate>Thu, 09 Jun 2011 07:00:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Harmony webapp&#8217;d</title>
		<link>http://blog.42at.com/harmony-webappd</link>
		<comments>http://blog.42at.com/harmony-webappd#comments</comments>
		<pubDate>Wed, 10 Mar 2010 14:21:05 +0000</pubDate>
		<dc:creator>Moos</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[drawing]]></category>
		<category><![CDATA[harmony]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[webapps]]></category>

		<guid isPermaLink="false">http://blog.42at.com/?p=163</guid>
		<description><![CDATA[Saw this nice little sketching app called Harmony, a procedural drawing tool, by Ricardo Cabello  (via Daring Fireball) that uses HTML5 canvas.   Works nicely on the iPhone too, so I thought it would be a great to have it as a webapp. The webapp version adds: offline mode via HTML5 cache full-screen mode two-finger pan/zoom [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://42at.com/lab/harmony" target="_blank"><img class="alignright size-full wp-image-164" title="Harmony webapp" src="http://blog.42at.com/wp-content/uploads/2010/03/startup.png" alt="Harmony webapp" width="192" height="276" /></a>Saw this nice little sketching app called <a href="http://mrdoob.com/blog/post/689">Harmony</a>, a procedural drawing tool, by  Ricardo Cabello  (via <a href="http://daringfireball.net/linked/2010/03/09/harmony">Daring Fireball</a>) that uses HTML5 canvas.   Works nicely on the iPhone too, so I thought it would be a great to have it as a webapp.</p>
<p>The webapp version adds:</p>
<ul>
<li>offline mode via HTML5 cache</li>
<li>full-screen mode</li>
<li>two-finger pan/zoom (upto 4x)</li>
</ul>
<p>To use the full-screen &amp; offline mode on your iPhone/iPod  Touch(/iPad?), bookmark the page and select &#8220;Add to Home Screen&#8221;.</p>
<h3>Desktop browser enhancements</h3>
<p>Other added features for desktop browsers include:</p>
<ul>
<li>autosave feature</li>
<li>session save</li>
<li>undo (de facto!)</li>
</ul>
<p>Alas, the autosave feature doesn&#8217;t work on the iPhone OS 3.1.3 due to the <a href="https://bugs.webkit.org/show_bug.cgi?id=33029">canvas origin-flag bug</a> (hopefully this&#8217;ll be fixed on OS 3.2!).  It works nicely on FF 3.6, Chrome 4.x, and Safari 4.x.  After a brief delay after the last user stroke (<em>about 5 secs</em>), the state of the canvas and the last brush is saved to sessionStorage (or localStorage in the case of Chrome as it doesn&#8217;t fully support sessionStorage yet).</p>
<p>This provides a convenient <strong>undo </strong>feature as well.  Don&#8217;t like your last few stroke, F5 (refresh) and zap! (You&#8217;ve got 5 seconds to decide!)</p>
<p>If localStorage is available (as in the three browsers mentioned) and &#8216;<strong>save</strong>&#8216; button is clicked, the canvas is also saved to<em> local storage</em>.  So even if the browser is restarted, it&#8217;ll start at the last saved canvas.</p>
<p>Thanks to Ricardo Cabello for this great tool.</p>
<p><strong>Try it: </strong><a href="http://42at.com/lab/harmony" target="_blank">Harmony webapp</a>.</p>
<p>Note: As Ricardo mentions in the comments to his post, you can take a snapshot of the canvas on the iPhone/iPod touch by pressing the power button and home button at the same time.   This is probably the best way to save/share on the iPhone.</p>
<p><strong>Update 1</strong>: 11 March 2010 &#8212; fixed offline issue.  Please re-install on iPhone/iPod Touch.</p>
<p><strong>Update 2:</strong> Examples of the awesome sketches being created in Harmony:</p>
<p>- Polish artists: <a href="http://blip.pl/tags/harmony" target="_blank">http://blip.pl/tags/harmony</a><br />
- alternatyves: <a href="http://twitpic.com/187ih1" target="_blank">here</a>, <a href="http://twitpic.com/17rc0b" target="_blank">here</a>, and <a href="http://twitpic.com/17rbi5" target="_blank">here</a><br />
- <a href="http://www.flickr.com/photos/axeldiego/4423305948/" target="_blank">in color</a><br />
- <a href="http://www.flickr.com/photos/nathanbowers/sets/72157623471092593/" target="_blank">more</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.42at.com/harmony-webappd/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Introducing touch-enabled spinControl</title>
		<link>http://blog.42at.com/introducing-touch-enabled-spincontrol</link>
		<comments>http://blog.42at.com/introducing-touch-enabled-spincontrol#comments</comments>
		<pubDate>Sat, 06 Feb 2010 22:45:12 +0000</pubDate>
		<dc:creator>Moos</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://blog.42at.com/?p=143</guid>
		<description><![CDATA[Hot on the heels of sliderControl comes its close cousin, the spinControl.   Whereas in the sliderControl, the thumb widget is moved across a fixed set of values to select the desired input, in the spinControl the whole set is movable.  This allows for larger set of data that can fit on the visible screen. All [...]]]></description>
			<content:encoded><![CDATA[<p>Hot on the heels of <a href="../slidercontrol">sliderControl </a>comes its  close cousin, the <strong>spinControl</strong>.   Whereas in the sliderControl, the thumb  widget is moved across a fixed set of values to select the desired  input, in the spinControl the whole set is movable.  This allows for  larger set of data that can fit on the visible screen.</p>
<p style="text-align: center;"><a href="http://blog.42at.com/spincontrol"><img class="aligncenter size-full wp-image-144" title="spin1" src="http://blog.42at.com/wp-content/uploads/2010/02/spin1.png" alt="" width="355" height="39" /></a></p>
<p>All the features of sliderControl are supported (kinetics, bounce, snap, toggle, events handlers, etc.).  Additionally, a new alignToEdge option allows the scroll area to align to the left and right edge of the viewport instead of its center.</p>
<p>For gory details, demo and download, see <a href="http://blog.42at.com/spincontrol">spinControl</a> page.</p>
<p><strong>Bonus</strong></p>
<p>Also included is a <strong>spinToggle </strong>class that mimic&#8217;s iPhone&#8217;s toggle switch, complete with slide action.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.42at.com/introducing-touch-enabled-spincontrol/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emulating iPhone&#8217;s slide-to-unlock</title>
		<link>http://blog.42at.com/emulating-iphones-slide-to-unlock</link>
		<comments>http://blog.42at.com/emulating-iphones-slide-to-unlock#comments</comments>
		<pubDate>Thu, 28 Jan 2010 06:58:42 +0000</pubDate>
		<dc:creator>Moos</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://blog.42at.com/?p=134</guid>
		<description><![CDATA[The touch-enabled sliderControl covered earlier is an easy UI widget to select a value from a set or a range of numbers.  It can be easily modified to function as a slide-to-unlock contorl that you see on the iPhone.  Enter the slideToAction control: mySlider6 = new slideToAction('#slider6', ['slide to unlock'], { onchange: function(){ alert('unlocked'); // [...]]]></description>
			<content:encoded><![CDATA[<p>The touch-enabled sliderControl <a href="http://blog.42at.com/introducing-a-touch-enabled-slider-control">covered earlier</a> is an easy UI widget to select a value from a set or a range of numbers.  It can be easily modified to function as a slide-to-unlock contorl that you see on the iPhone.  Enter the <strong>slideToAction</strong> control:</p>
<pre>mySlider6 = new slideToAction('#slider6', ['slide to unlock'], {
	onchange: function(){
		alert('unlocked'); // some useful action!
	}
});</pre>
<p><strong>Markup:</strong></p>
<pre>&lt;div id="slider6" class="slider"&gt;&lt;/div&gt;</pre>
<p>When the thumnail is moved all the way to the end, the onchange handler gets called.  Simple.  slideToAction inherits all of sliderControl&#8217;s kenetics and emulates the spotlight effect of iPhone&#8217;s control.</p>
<p>slideToAction is included as part of <a href="http://blog.42at.com/slidercontrol/">sliderControl</a>.  See item #6 &#8216;single value slider&#8217; on the <a href="http://42at.com/lab/sliderControl">demo page</a>.</p>
<p><img class="aligncenter size-full wp-image-138" title="slideToAction" src="http://blog.42at.com/wp-content/uploads/2010/01/slideToAction1.png" alt="" width="321" height="62" /></p>
<p>(The thumbnail looks better on the iPhone browser!)</p>
<p>The spotlight effect of the label text is achieved using -webkit-mask-* CSS attribute and animating the  -webkit-mask-position property.  Here&#8217;s the CSS:</p>
<pre>.sliderAction .sliderLabel {
	font-size:18px;
	font-weight:normal;
	text-shadow:none;
	color: #fff;
	-webkit-mask-image: -webkit-gradient(linear, 35% top, 65% top,
           from(rgba(0,0,0,.20)), color-stop(.5,rgba(0,0,0,1)), to(rgba(0,0,0,.20)));
	-webkit-mask-size: 50%;
	-webkit-mask-repeat: none;

	-webkit-animation-name: spotlight;
	-webkit-animation-timing-function: linear;
	-webkit-animation-duration: 1500ms;
	-webkit-animation-iteration-count: infinite;
}</pre>
<p>using the animation keyframes:</p>
<pre>@-webkit-keyframes spotlight {
    from {-webkit-mask-position: 0;}
    to {-webkit-mask-position: 100%;}
}</pre>
<p>The  -webkit-mask-position property is animated on desktop Safari 4.x and Chrome 4.x.   It isn’t supported on iPhone OS 3.1.2 browser&#8230; but hopefully it will under 3.2.</p>
<p><strong>Update: </strong>(11 March 2010)</p>
<p>New version 0.1a has an updated slideToAction() that looks more like the real thing.  Here&#8217;s a screenshot.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-167" title="slideToAction - version 0.1a" src="http://blog.42at.com/wp-content/uploads/2010/01/slideToAction1a1.png" alt="" width="368" height="74" /></p>
<p style="text-align: left;">Seems like SDK developers have been trying to get this feature implemented as well.  See <a href="http://www.iphonedevsdk.com/forum/iphone-sdk-development/11470-there-way-i-can-use-slide-unlock-slider.html">here</a> and <a href="http://stackoverflow.com/questions/438046/iphone-slide-to-unlock-animation">here</a>.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">http://blog.42at.com/introducing-a-touch-enabled-slider-control</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.42at.com/emulating-iphones-slide-to-unlock/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing a touch-enabled slider control</title>
		<link>http://blog.42at.com/introducing-a-touch-enabled-slider-control</link>
		<comments>http://blog.42at.com/introducing-a-touch-enabled-slider-control#comments</comments>
		<pubDate>Fri, 22 Jan 2010 19:39:26 +0000</pubDate>
		<dc:creator>Moos</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://blog.42at.com/?p=97</guid>
		<description><![CDATA[I needed a touch-enabled slider input control for a project I was working on.  Unfortunately there was no good existing solution, so I rolled my own. Features: kinetic snap to value optimized CSS animation full range of slider values supported customizable with extensive options fully programmable event callbacks adjusts on orientation change works on desktop [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.42at.com/wp-content/uploads/2010/01/slider1.png"></a><a href="http://blog.42at.com/slidercontrol/"><img class="alignright size-medium wp-image-132" title="slider1" src="http://blog.42at.com/wp-content/uploads/2010/01/slider1-146x300.png" alt="" width="146" height="300" /></a></p>
<p>I needed a touch-enabled slider input control for a project I was working on.  Unfortunately there was no good existing solution, so I rolled my own.</p>
<h2>Features:</h2>
<ul>
<li>kinetic snap to value</li>
<li>optimized CSS animation</li>
<li>full range of slider values supported</li>
<li>customizable with extensive options</li>
<li>fully programmable</li>
<li>event callbacks</li>
<li>adjusts on orientation change</li>
<li>works on desktop webkit browsers (for testing)</li>
<li>theme to taste!</li>
</ul>
<p>See <a href="http://blog.42at.com/slidercontrol/">sliderControl page</a> for details.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.42at.com/introducing-a-touch-enabled-slider-control/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>★ More on PastryKit</title>
		<link>http://blog.42at.com/%e2%98%85-more-on-pastrykit</link>
		<comments>http://blog.42at.com/%e2%98%85-more-on-pastrykit#comments</comments>
		<pubDate>Mon, 28 Dec 2009 14:30:52 +0000</pubDate>
		<dc:creator>Moos</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[webapps]]></category>

		<guid isPermaLink="false">http://blog.42at.com/?p=21</guid>
		<description><![CDATA[Daring Fireball Lastly, there’s the question of how concerned Apple is, strategically, that a robust web app API and market would take away from the App Store. And if so, are they worried about the money? I’d guess probably not. I don’t think Apple’s 30 percent cut of App Store revenue is anything to sneeze [...]]]></description>
			<content:encoded><![CDATA[<p>Daring Fireball</p>
<blockquote><p><span style="font-family: arial, sans-serif; line-height: normal; border-collapse: collapse;">Lastly, there’s the question of how concerned Apple is, strategically, that a robust web app API and market would take away from the App Store. And if so, are they worried about the money? I’d guess probably not. I don’t think Apple’s 30 percent cut of App Store revenue is anything to sneeze at, and it’s growing fast. But there’s no question that the App Store exists to sell iPhones and iPod Touches, not the other way around.</span></p></blockquote>
<p>via <a href="http://daringfireball.net/2009/12/more_on_pastrykit">★ More on PastryKit</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.42at.com/%e2%98%85-more-on-pastrykit/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

