<?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>Typpz Blog &#187; iPhone programming</title>
	<atom:link href="http://blog.typpz.com/category/iphone-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.typpz.com</link>
	<description>tips, tutorials, guides, news and reviews</description>
	<lastBuildDate>Thu, 11 Feb 2010 22:38:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>iPhone programming: How to force your app to run in landscape mode</title>
		<link>http://blog.typpz.com/2010/02/12/iphone-programming-how-to-force-your-app-to-run-in-landscape-mode/</link>
		<comments>http://blog.typpz.com/2010/02/12/iphone-programming-how-to-force-your-app-to-run-in-landscape-mode/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 22:38:46 +0000</pubDate>
		<dc:creator>Nikos Typpz</dc:creator>
				<category><![CDATA[Apple Mac]]></category>
		<category><![CDATA[iPhone programming]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://blog.typpz.com/?p=497</guid>
		<description><![CDATA[As you may have mentioned, lot of iPhone apps (especially games) run by default in landscape mode! You can easily force the app you develop to run in landscape mode! Let&#8217;s see how: In Xcode find the file [YourAppName]-Info.plist and open it up. Right click on the table and select “Add Row”. Select &#8220;Initial interface [...]]]></description>
			<content:encoded><![CDATA[<p>As you may have mentioned, lot of iPhone apps (especially games) run by default in landscape mode! You can easily force the app you develop to run in landscape mode! Let&#8217;s see how:</p>
<ol>
<li> In Xcode find the file [YourAppName]-Info.plist and open it up.</li>
<li>Right click on the table and select “Add Row”. Select &#8220;Initial interface orientation&#8221; and set the value to Landscape (left or right).</li>
<li>Right click again and add Status bar is initially hidden.This is optional, it has nothing to do with view orientation, but it will hide the status bar.<a href="http://blog.typpz.com/wp-content/xcodeorientation.png"><img class="size-full wp-image-502 alignleft" title="xcodeorientation" src="http://blog.typpz.com/wp-content/xcodeorientation.png" alt="" width="426" height="50" /></a></li>
<li>Open [YourAppName]ViewController.m file and uncomment the following:
<pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee; font-size: 12px; border: 1px dashed #999999; line-height: 14px; padding: 5px; overflow: auto; width: 90%;"><code>// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
</code></pre>
</li>
<li>Change the code you just uncommented to look like this:
<pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee; font-size: 12px; border: 1px dashed #999999; line-height: 14px; padding: 5px; overflow: auto; width: 90%;"><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}</code></pre>
<p>Parameter <code>interfaceOrientation == UIInterfaceOrientationLandscapeRight</code> starts the app with the Home button at the right side. i<code>nterfaceOrientation == UIInterfaceOrientationLandscapeLeft</code> starts the app with the Home button at the left side. Set the same landscape orientation that you&#8217;ve set in Info.plist file.</li>
</ol>
<img src="http://blog.typpz.com/?ak_action=api_record_view&id=497&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.typpz.com/2010/02/12/iphone-programming-how-to-force-your-app-to-run-in-landscape-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
