<?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>de &#187; willRotateToInterfaceOrientation</title>
	<atom:link href="http://duivesteyn.net/tag/willrotatetointerfaceorientation/feed/" rel="self" type="application/rss+xml" />
	<link>http://duivesteyn.net</link>
	<description></description>
	<lastBuildDate>Tue, 20 Apr 2010 22:00:41 +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 iPad Development &#8211; Quick &#8211; TableView Properties</title>
		<link>http://duivesteyn.net/2010/02/12/iphone-ipad-development-quick-tableview-properties/</link>
		<comments>http://duivesteyn.net/2010/02/12/iphone-ipad-development-quick-tableview-properties/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 07:00:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iPhone SDK Tips]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[object dimensions]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[tableview dimensions]]></category>
		<category><![CDATA[willRotateToInterfaceOrientation]]></category>

		<guid isPermaLink="false">http://duivesteyn.net/?p=366</guid>
		<description><![CDATA[I am currently working on supporting multi orientations of the iPhone (iPad) Screen, where on rotation some objects will be resized and others will be moved. For example I am wanting to move a tableView object and I want to ensure when I rotate back to Portrait that the tableview ends up in the exact [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://duivesteyn.net/wp-content/uploads/2010/02/iPad.png" rel="lightbox[366]"><img class="alignright size-full wp-image-380" title="iPad" src="http://duivesteyn.net/wp-content/uploads/2010/02/iPad.png" alt="" width="202" height="255" /></a>I am currently working on supporting multi orientations of the iPhone (iPad) Screen, where on rotation some objects will be resized and others will be moved. For example I am wanting to move a tableView object and I want to ensure when I rotate back to Portrait that the tableview ends up in the exact same place before I moved it.</p>
<p>I came up with some quick debug code you can use in your iPhone App Development (or iPad App development).</p>
<p>The idea is you get the H,W,X,Y co-ordinates and can then later perfectly replace the initial properties.</p>
<p><strong>Run this in viewDidAppear (for example)</strong></p>
<p>int height = tableView.frame.size.height;<br />
 int width = tableView.frame.size.width;<br />
 int x = tableView.frame.origin.x;<br />
 int y = tableView.frame.origin.y;</p>
<p>NSLog(@&#8221;TableView Height:%d&#8221;,height);<br />
 NSLog(@&#8221;TableViewWidth:%d&#8221;,width);<br />
 NSLog(@&#8221;TableViewX:%d&#8221;,x);<br />
 NSLog(@&#8221;TableViewY:%d&#8221;,y);</p>
<p><br class="spacer_" /></p>
<p><strong>Then later in willRotateToInterfaceOrientation you can use the code:</strong></p>
<p>tableView.frame = CGRectMake(x, y,	w, h);  //where x,y are the frame origin coordinates (x,y) and w,h are the width and height of the frame</p>
]]></content:encoded>
			<wfw:commentRss>http://duivesteyn.net/2010/02/12/iphone-ipad-development-quick-tableview-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
