<?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>iPhone Developer News &#187; Tutorials</title>
	<atom:link href="http://www.iphone-developer.co.uk/index.php/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iphone-developer.co.uk</link>
	<description>iPhone Developers of the World Unite!</description>
	<lastBuildDate>Wed, 08 Apr 2009 11:14:28 +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>Creating a WebClip Bookmark Icon</title>
		<link>http://www.iphone-developer.co.uk/index.php/2008/01/16/creating-a-webclip-bookmark-icon/</link>
		<comments>http://www.iphone-developer.co.uk/index.php/2008/01/16/creating-a-webclip-bookmark-icon/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 21:16:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.iphone-developer.co.uk/index.php/2008/01/16/creating-a-webclip-bookmark-icon/</guid>
		<description><![CDATA[If you want to make a custom icon for your website that will show up in the Springboard when a user makes a &#8220;webclip&#8221;, using their iPhone or iPod Touch, all you need to do is:
1. Create a 57&#215;57 pixel PNG image
2. Name the image &#8220;apple-touch-icon.png&#8221;
3. Copy it to the root folder of your website
If you want more flexibility i.e. you [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to make a custom icon for your website that will show up in the Springboard when a user makes a &#8220;webclip&#8221;, using their iPhone or iPod Touch, all you need to do is:</p>
<p>1. Create a 57&#215;57 pixel PNG image</p>
<p>2. Name the image &#8220;apple-touch-icon.png&#8221;</p>
<p>3. Copy it to the root folder of your website</p>
<p><span id="more-30"></span>If you want more flexibility i.e. you don&#8217;t have access to the root of your site or you want to use a different file name or format, then you can use a link tag in the head of the document, such as:</p>
<p><em>&lt;head&gt;<br />
    &lt;title&gt;iHelloWorld&lt;/title&gt;<br />
    &lt;link rel=&#8221;apple-touch-icon&#8221; href=&#8221;/whatever.jpg&#8221; mce_href=&#8221;/whatever.jpg&#8221;/&gt;<br />
&lt;/head&gt;</em></p>
<p>If you do use an image that is larger than 57&#215;57 pixels it will be scaled down automatically for you. Also, Safari will automatically composite the icon with the standard &#8220;glassy&#8221; overlay so it looks like a built-in iPhone or iPod application should your imaging skills be as bad as mine!.</p>
<p>Note: There is some degree of clipping off the sides of the icon that can&#8217;t really be controlled. If you scale down a circular logo (in EPS format) to 57&#215;57, there is a noticeable clip on the sides. With that in mind, I recommend adding a pixel or two on the sides if you&#8217;re using a circular design. Note that scaling the icon down under 57&#215;57 does not solve this, it merely scales it up to fit the 57&#215;57.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.iphone-developer.co.uk%2Findex.php%2F2008%2F01%2F16%2Fcreating-a-webclip-bookmark-icon%2F';
  addthis_title  = 'Creating+a+WebClip+Bookmark+Icon';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-developer.co.uk/index.php/2008/01/16/creating-a-webclip-bookmark-icon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone window.onorientationchange Code</title>
		<link>http://www.iphone-developer.co.uk/index.php/2008/01/13/iphone-windowonorientationchange-code/</link>
		<comments>http://www.iphone-developer.co.uk/index.php/2008/01/13/iphone-windowonorientationchange-code/#comments</comments>
		<pubDate>Sun, 13 Jan 2008 21:58:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.iphone-developer.co.uk/index.php/2008/01/13/iphone-windowonorientationchange-code/</guid>
		<description><![CDATA[Apple has put up some sample code that shows off the new window.onorientationchange and window.orientation ability that lets you detect the orientation of the iPhone.
You setup your HTML with a body tag with the class of &#8220;portrait&#8221; or &#8220;landscape&#8221; and most of the CSS goes from that. You also put an empty div with the [...]]]></description>
			<content:encoded><![CDATA[<p>Apple has put up some sample code that shows off the new <a href="http://developer.apple.com/samplecode/iPhoneOrientation/index.html" target="_blank">window.onorientationchange and window.orientation</a> ability that lets you detect the orientation of the iPhone.</p>
<p><span id="more-28"></span>You setup your HTML with a body tag with the class of &#8220;portrait&#8221; or &#8220;landscape&#8221; and most of the CSS goes from that. You also put an empty div with the id of <a href="http://developer.apple.com/samplecode/iPhoneOrientation/listing2.html" target="_blank">currentOrientation</a> that is used for some of the magic.</p>
<p>Below is a simple JavaScript handler:</p>
<p>window.onorientationchange = function() {<br />
<font color="#008000"><em> /*window.orientation returns a value that indicates whether iPhone is in portrait mode, landscape mode with the screen turned to the<br />
left, or landscape mode with the screen turned to the right. */<br />
</em></font> var orientation = window.orientation;</p>
<p>switch(orientation)<br />
{</p>
<p>case <font color="#ff0000">0</font>:<br />
<font color="#008000"> /* If in portrait mode, sets the body&#8217;s class attribute to portrait. Consequently, all style definitions matching the body[class="portrait"] declaration<br />
in the iPhoneOrientation.css file will be selected and used to style &#8220;Handling iPhone or iPod touch Orientation Events&#8221;. */<br />
</font> document.body.setAttribute(&#8220;class&#8221;,&#8221;portrait&#8221;);</p>
<p><font color="#008000"><em>/* Add a descriptive message on &#8220;Handling iPhone or iPod touch Orientation Events&#8221;  */<br />
</em></font> document.getElementById(&#8220;currentOrientation&#8221;).innerHTML=&#8221;Now in portrait orientation (Home button on the bottom).&#8221;;<br />
break;</p>
<p>case <font color="#ff0000">90</font>:<br />
<font color="#008000"> /* If in landscape mode with the screen turned to the left, sets the body&#8217;s class attribute to landscapeLeft. In this case, all style definitions matching the<br />
body[class="landscapeLeft"] declaration in the iPhoneOrientation.css file will be selected and used to style &#8220;Handling iPhone or iPod touch Orientation Events&#8221;. */<br />
</font> document.body.setAttribute(&#8220;class&#8221;,&#8221;landscapeLeft&#8221;);</p>
<p>document.getElementById(&#8220;currentOrientation&#8221;).innerHTML=&#8221;Now in landscape orientation and turned to the left (Home button to the right).&#8221;;<br />
break;</p>
<p>case <font color="#ff0000">-90</font>:<br />
<font color="#008000"> /* If in landscape mode with the screen turned to the right, sets the body&#8217;s class attribute to landscapeRight. Here, all style definitions matching the<br />
body[class="landscapeRight"] declaration in the iPhoneOrientation.css file will be selected and used to style &#8220;Handling iPhone or iPod touch Orientation Events&#8221;. */<br />
</font> document.body.setAttribute(&#8220;class&#8221;,&#8221;landscapeRight&#8221;);</p>
<p>document.getElementById(&#8220;currentOrientation&#8221;).innerHTML=&#8221;Now in landscape orientation and turned to the right (Home button to the left).&#8221;;<br />
break;<br />
}<br />
}</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.iphone-developer.co.uk%2Findex.php%2F2008%2F01%2F13%2Fiphone-windowonorientationchange-code%2F';
  addthis_title  = 'iPhone+window.onorientationchange+Code';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-developer.co.uk/index.php/2008/01/13/iphone-windowonorientationchange-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
