<?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: How To Create A Data Entry Screen</title>
	<atom:link href="http://iPhoneIncubator.com/blog/windows-views/how-to-create-a-data-entry-screen/feed" rel="self" type="application/rss+xml" />
	<link>http://iPhoneIncubator.com/blog/windows-views/how-to-create-a-data-entry-screen</link>
	<description>Tips and Tricks for iPhone SDK Developers</description>
	<lastBuildDate>Thu, 11 Mar 2010 21:29:19 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Cameron</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-create-a-data-entry-screen/comment-page-1#comment-1663</link>
		<dc:creator>Cameron</dc:creator>
		<pubDate>Sat, 12 Dec 2009 23:43:07 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=161#comment-1663</guid>
		<description>And now looking back at my reasoning - after my comment - I see what&#039;s going on. The size of the content inside, not the size of the scrollView, is getting resized. So I understand how that should work, but now I&#039;m back to square one in understanding why it doesn&#039;t work as intended.

Any ideas, Nick?</description>
		<content:encoded><![CDATA[<p>And now looking back at my reasoning &#8211; after my comment &#8211; I see what&#8217;s going on. The size of the content inside, not the size of the scrollView, is getting resized. So I understand how that should work, but now I&#8217;m back to square one in understanding why it doesn&#8217;t work as intended.</p>
<p>Any ideas, Nick?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cameron</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-create-a-data-entry-screen/comment-page-1#comment-1662</link>
		<dc:creator>Cameron</dc:creator>
		<pubDate>Sat, 12 Dec 2009 23:35:09 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=161#comment-1662</guid>
		<description>@Karl and @Jason,

I *might* have figured out the jump problem.  had the exact same issue in an app I&#039;m working on right now. Coincidentally, it&#039;s my first iPhone app, so my understanding and explanation might be a bit limited.

Here&#039;s the solution that works for me. I assume it should work for you guys, too. scroll up and look at line 11 of the scrollViewToCenterOfScreen: method. Instead of adding the keyboard height, it works perfectly well when I *subtract* the keyboard height:
	scrollView.contentSize = CGSizeMake(applicationFrame.size.width, applicationFrame.size.height - keyboardBounds.size.height);

That&#039;s the same as saying:
scrollView.contentSize = CGSizeMake(applicationFrame.size.width, availableHeight);

OR you could delete that line altogether and have the same result.

It makes sense to me because you&#039;re supposed to be making that scrollView smaller, not adding to make it larger (the height PLUS the height of the KB). Because you can delete the line and still have the same results, it tells me that the size of the scrollView is unimportant, but you do have to know the point where they offset is located. The only side effect I see is that the scrollView doesn&#039;t scroll when the keyboard is activated. Personally I like it that way, as it keeps focus on where the user is typing. 

This method hasn&#039;t been checked with textViews - only textFields. YMMV</description>
		<content:encoded><![CDATA[<p>@Karl and @Jason,</p>
<p>I *might* have figured out the jump problem.  had the exact same issue in an app I&#8217;m working on right now. Coincidentally, it&#8217;s my first iPhone app, so my understanding and explanation might be a bit limited.</p>
<p>Here&#8217;s the solution that works for me. I assume it should work for you guys, too. scroll up and look at line 11 of the scrollViewToCenterOfScreen: method. Instead of adding the keyboard height, it works perfectly well when I *subtract* the keyboard height:<br />
	scrollView.contentSize = CGSizeMake(applicationFrame.size.width, applicationFrame.size.height &#8211; keyboardBounds.size.height);</p>
<p>That&#8217;s the same as saying:<br />
scrollView.contentSize = CGSizeMake(applicationFrame.size.width, availableHeight);</p>
<p>OR you could delete that line altogether and have the same result.</p>
<p>It makes sense to me because you&#8217;re supposed to be making that scrollView smaller, not adding to make it larger (the height PLUS the height of the KB). Because you can delete the line and still have the same results, it tells me that the size of the scrollView is unimportant, but you do have to know the point where they offset is located. The only side effect I see is that the scrollView doesn&#8217;t scroll when the keyboard is activated. Personally I like it that way, as it keeps focus on where the user is typing. </p>
<p>This method hasn&#8217;t been checked with textViews &#8211; only textFields. YMMV</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark ON</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-create-a-data-entry-screen/comment-page-1#comment-1506</link>
		<dc:creator>Mark ON</dc:creator>
		<pubDate>Tue, 17 Nov 2009 01:21:04 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=161#comment-1506</guid>
		<description>Trying to get this logic to work! I am assuming that most of the above code should be implemented in the .m file of the controller file that is being created.

Everything compiles but when I try to enter a textField field I get this:
2009-11-16 20:23:09.504 TestMe[1287:20b] *** -[CreateNewTestViewController keyboardNotification]: unrecognized selector sent to instance 0x3f30bb0
2009-11-16 20:23:09.506 TestMe[1287:20b] *** Terminating app due to uncaught exception &#039;NSInvalidArgumentException&#039;, reason: &#039;*** -[CreateNewTestViewController keyboardNotification]: unrecognized selector sent to instance 0x3f30bb0&#039;

Any suggestions?

Thanks</description>
		<content:encoded><![CDATA[<p>Trying to get this logic to work! I am assuming that most of the above code should be implemented in the .m file of the controller file that is being created.</p>
<p>Everything compiles but when I try to enter a textField field I get this:<br />
2009-11-16 20:23:09.504 TestMe[1287:20b] *** -[CreateNewTestViewController keyboardNotification]: unrecognized selector sent to instance 0&#215;3f30bb0<br />
2009-11-16 20:23:09.506 TestMe[1287:20b] *** Terminating app due to uncaught exception &#8216;NSInvalidArgumentException&#8217;, reason: &#8216;*** -[CreateNewTestViewController keyboardNotification]: unrecognized selector sent to instance 0&#215;3f30bb0&#8242;</p>
<p>Any suggestions?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-create-a-data-entry-screen/comment-page-1#comment-1104</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Mon, 07 Sep 2009 12:53:03 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=161#comment-1104</guid>
		<description>Great article.  This helped a bunch!</description>
		<content:encoded><![CDATA[<p>Great article.  This helped a bunch!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-create-a-data-entry-screen/comment-page-1#comment-1048</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Fri, 21 Aug 2009 16:38:28 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=161#comment-1048</guid>
		<description>I&#039;ve inserted the code into my app for the NSArray but I get &quot;error: &#039;entryFields&#039; undeclared (first use in this function)&quot; right after &quot;if (!entryFields) { . I then also get an error of &quot;warning: control reaches end of non-void function&quot; after &quot;return entryFields; } . What am I missing?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve inserted the code into my app for the NSArray but I get &#8220;error: &#8216;entryFields&#8217; undeclared (first use in this function)&#8221; right after &#8220;if (!entryFields) { . I then also get an error of &#8220;warning: control reaches end of non-void function&#8221; after &#8220;return entryFields; } . What am I missing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-create-a-data-entry-screen/comment-page-1#comment-1009</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Mon, 03 Aug 2009 00:49:20 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=161#comment-1009</guid>
		<description>Karl, any luck?

I&#039;m having the same thing happen only slightly weirder.  I have two text fields, the top one works perfectly but the bottom one (immediately below the top one) behaves just as you explain, &quot;snaps back&quot; after it starts scrolling the desired direction.

If you found any fix, please post!</description>
		<content:encoded><![CDATA[<p>Karl, any luck?</p>
<p>I&#8217;m having the same thing happen only slightly weirder.  I have two text fields, the top one works perfectly but the bottom one (immediately below the top one) behaves just as you explain, &#8220;snaps back&#8221; after it starts scrolling the desired direction.</p>
<p>If you found any fix, please post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-create-a-data-entry-screen/comment-page-1#comment-953</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Thu, 25 Jun 2009 11:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=161#comment-953</guid>
		<description>Hey there,
This worked almost perfect for me except for one thing. If the scrollview is at the top (i.e. on first load) then the scroll view snaps back to the top after it scrolls to the textfield. If you immediately touch the textfield again or scroll a bit down first then it works ok.
Any ideas why this would happen, its driving me nuts!</description>
		<content:encoded><![CDATA[<p>Hey there,<br />
This worked almost perfect for me except for one thing. If the scrollview is at the top (i.e. on first load) then the scroll view snaps back to the top after it scrolls to the textfield. If you immediately touch the textfield again or scroll a bit down first then it works ok.<br />
Any ideas why this would happen, its driving me nuts!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chad</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-create-a-data-entry-screen/comment-page-1#comment-935</link>
		<dc:creator>Chad</dc:creator>
		<pubDate>Thu, 11 Jun 2009 23:29:13 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=161#comment-935</guid>
		<description>Roland, this is a month later, but...
you may have to
[myTextField setDelegate:self];</description>
		<content:encoded><![CDATA[<p>Roland, this is a month later, but&#8230;<br />
you may have to<br />
[myTextField setDelegate:self];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roland</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-create-a-data-entry-screen/comment-page-1#comment-764</link>
		<dc:creator>Roland</dc:creator>
		<pubDate>Sat, 16 May 2009 12:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=161#comment-764</guid>
		<description>I&#039;m having trouble getting this code working in my app.  There are no build errors but no matter what I do textFieldDidBeginEditing and scrollViewToCenterOfScreen won&#039;t fire.

Any chance of posting a working sample for download so I compare it with mine?

Cheers</description>
		<content:encoded><![CDATA[<p>I&#8217;m having trouble getting this code working in my app.  There are no build errors but no matter what I do textFieldDidBeginEditing and scrollViewToCenterOfScreen won&#8217;t fire.</p>
<p>Any chance of posting a working sample for download so I compare it with mine?</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iphone architect</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-create-a-data-entry-screen/comment-page-1#comment-698</link>
		<dc:creator>iphone architect</dc:creator>
		<pubDate>Wed, 06 May 2009 07:45:18 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=161#comment-698</guid>
		<description>very good article, thanks</description>
		<content:encoded><![CDATA[<p>very good article, thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
