<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>Comments on: [Objective-C + Cocoa]  UIScrollView and contentSize</title>
	<atom:link href="https://codethink.no-ip.org/archives/357/feed" rel="self" type="application/rss+xml" />
	<link>https://codethink.no-ip.org/archives/357</link>
	<description>A blog about coding, life, and other arbitrary topics</description>
	<lastBuildDate>Fri, 31 Jan 2020 05:12:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.29</generator>
	<item>
		<title>By: Bob</title>
		<link>https://codethink.no-ip.org/archives/357#comment-13388</link>
		<dc:creator><![CDATA[Bob]]></dc:creator>
		<pubDate>Mon, 03 Sep 2012 15:19:27 +0000</pubDate>
		<guid isPermaLink="false">http://codethink.no-ip.org/wordpress/?p=357#comment-13388</guid>
		<description><![CDATA[http://xkcd.com/386/]]></description>
		<content:encoded><![CDATA[<p><a href="http://xkcd.com/386/" rel="nofollow">http://xkcd.com/386/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>https://codethink.no-ip.org/archives/357#comment-13387</link>
		<dc:creator><![CDATA[Bob]]></dc:creator>
		<pubDate>Mon, 03 Sep 2012 15:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://codethink.no-ip.org/wordpress/?p=357#comment-13387</guid>
		<description><![CDATA[I think it would be better to find the outmost coordinates of the subviews and then set your contentSize based on that.

Instead of:
&lt;code&gt;
for (UIView* subview in self.subviews) 
{
    contentWidth += subview.frame.size.width;
    contentHeight += subview.frame.size.height;
}
&lt;/code&gt;
try
&lt;code&gt;
for (UIView* subview in self.subviews) 
{
    contentLeft = contentLeft  subview.frame.origin.x + subview.frame.size.width ? 
            contentRight : subview.frame.origin.x + subview.frame.size.width;

    contentTop = contentTop  subview.frame.origin.y + subview.frame.size.height ? 
            contentBottom : subview.frame.origin.y + subview.frame.size.height;
}

contentSize.width = horizontalPadding + ( contentRight - contentLeft );
contentSize.height = verticalPadding + ( contentBottom = contentTop );
&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>I think it would be better to find the outmost coordinates of the subviews and then set your contentSize based on that.</p>
<p>Instead of:<br />
<code><br />
for (UIView* subview in self.subviews)<br />
{<br />
    contentWidth += subview.frame.size.width;<br />
    contentHeight += subview.frame.size.height;<br />
}<br />
</code><br />
try<br />
<code><br />
for (UIView* subview in self.subviews)<br />
{<br />
    contentLeft = contentLeft  subview.frame.origin.x + subview.frame.size.width ?<br />
            contentRight : subview.frame.origin.x + subview.frame.size.width;</p>
<p>    contentTop = contentTop  subview.frame.origin.y + subview.frame.size.height ?<br />
            contentBottom : subview.frame.origin.y + subview.frame.size.height;<br />
}</p>
<p>contentSize.width = horizontalPadding + ( contentRight - contentLeft );<br />
contentSize.height = verticalPadding + ( contentBottom = contentTop );<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>https://codethink.no-ip.org/archives/357#comment-11042</link>
		<dc:creator><![CDATA[john]]></dc:creator>
		<pubDate>Mon, 26 Mar 2012 01:29:31 +0000</pubDate>
		<guid isPermaLink="false">http://codethink.no-ip.org/wordpress/?p=357#comment-11042</guid>
		<description><![CDATA[Really nice one , thanks for sharing this.]]></description>
		<content:encoded><![CDATA[<p>Really nice one , thanks for sharing this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vikas</title>
		<link>https://codethink.no-ip.org/archives/357#comment-10458</link>
		<dc:creator><![CDATA[vikas]]></dc:creator>
		<pubDate>Mon, 20 Feb 2012 13:35:52 +0000</pubDate>
		<guid isPermaLink="false">http://codethink.no-ip.org/wordpress/?p=357#comment-10458</guid>
		<description><![CDATA[Can any one tell me the every co-ordinate of scroll indicator in UITableView in iPhone?]]></description>
		<content:encoded><![CDATA[<p>Can any one tell me the every co-ordinate of scroll indicator in UITableView in iPhone?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 6kN31C5Lr16</title>
		<link>https://codethink.no-ip.org/archives/357#comment-42</link>
		<dc:creator><![CDATA[6kN31C5Lr16]]></dc:creator>
		<pubDate>Mon, 18 Apr 2011 18:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://codethink.no-ip.org/wordpress/?p=357#comment-42</guid>
		<description><![CDATA[I want to post quick hello and want to say appriciate for this good article.]]></description>
		<content:encoded><![CDATA[<p>I want to post quick hello and want to say appriciate for this good article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bt</title>
		<link>https://codethink.no-ip.org/archives/357#comment-38</link>
		<dc:creator><![CDATA[bt]]></dc:creator>
		<pubDate>Sun, 17 Apr 2011 10:06:39 +0000</pubDate>
		<guid isPermaLink="false">http://codethink.no-ip.org/wordpress/?p=357#comment-38</guid>
		<description><![CDATA[Great work,webmaster,nice design!]]></description>
		<content:encoded><![CDATA[<p>Great work,webmaster,nice design!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: electric cigarette</title>
		<link>https://codethink.no-ip.org/archives/357#comment-19</link>
		<dc:creator><![CDATA[electric cigarette]]></dc:creator>
		<pubDate>Wed, 23 Mar 2011 19:28:04 +0000</pubDate>
		<guid isPermaLink="false">http://codethink.no-ip.org/wordpress/?p=357#comment-19</guid>
		<description><![CDATA[Thanks for that awesome posting. It saved MUCH time :-)]]></description>
		<content:encoded><![CDATA[<p>Thanks for that awesome posting. It saved MUCH time <img src="https://codethink.no-ip.org/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley" /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rv reviews</title>
		<link>https://codethink.no-ip.org/archives/357#comment-16</link>
		<dc:creator><![CDATA[rv reviews]]></dc:creator>
		<pubDate>Fri, 18 Mar 2011 01:03:59 +0000</pubDate>
		<guid isPermaLink="false">http://codethink.no-ip.org/wordpress/?p=357#comment-16</guid>
		<description><![CDATA[You completed various fine points there. I did a search on the subject and found most persons will consent with your blog.]]></description>
		<content:encoded><![CDATA[<p>You completed various fine points there. I did a search on the subject and found most persons will consent with your blog.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
