<?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 for LocassaLocassa | Unique apps, app development, iPhone app developers</title>
	<atom:link href="http://locassa.com/index.php/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://locassa.com</link>
	<description>Unique apps, app development, iPhone app developers</description>
	<lastBuildDate>Sat, 28 Apr 2012 17:17:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on Apple App Store Approval Process Explained by Simon</title>
		<link>http://locassa.com/index.php/apple-app-store-approval-process-explained/#comment-957</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Sat, 28 Apr 2012 17:17:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.locassa.com/?p=726#comment-957</guid>
		<description>I believe the submission process was updated recently to require submissions built with the iOS5 SDK. Did you find this to be the case?</description>
		<content:encoded><![CDATA[<p>I believe the submission process was updated recently to require submissions built with the iOS5 SDK. Did you find this to be the case?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Interactive Rich Text UILabel by Gabriel Nica</title>
		<link>http://locassa.com/index.php/interactive-rich-text-uilabel/#comment-882</link>
		<dc:creator>Gabriel Nica</dc:creator>
		<pubDate>Wed, 25 Apr 2012 13:00:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.locassa.com/?p=817#comment-882</guid>
		<description>This is because when the text is split in word elements, the new lines are are not taken into account. The text is split by occurrences of the white space so for &quot;\nBeginning of line&quot; you will end up with an array of [@&quot;\nBeginning&quot;, @&quot;of&quot;, @&quot;line&quot;]. First word will be rendered with a UILabel and will have double the height, eventually overlapping other text bellow.
To fix this, first modify the &quot;elements&quot; array to be a NSMutableArray instead of just NSArray.
Then, modify the setText: selector to read the following:
- (void)setText:(NSString *)value {
    [elements release];
    elements = [NSMutableArray array];
    for (NSString *element in [value componentsSeparatedByString:@&quot; &quot;])
    {
        if ([element rangeOfString:@&quot;\n&quot;].location != NSNotFound)
        {
            NSArray *temp = [element componentsSeparatedByString:@&quot;\n&quot;];
            for (NSString *tempEl in temp)
            {
                [elements addObject: ([tempEl length] == 1 ? @&quot;\n&quot; : tempEl)];
            }
        }
        else
        {
            [elements addObject:element];
        }
    }
	[elements retain];
	[self setNeedsLayout];
}
In the layoutSubviews override, after the elementSize and controlSize are calculated, replace the if statement to take into account that a new line will have a width of zero, and to instruct the rendering to increase the y component of the location
if(elementSize.height &gt; controlSize.height &#124;&#124; elementSize.width == 0) {
	position.y += controlSize.height;
	position.x = 0.0;
}
By now everything works pretty well, but there will be an extra space in front of the first words after the new line, so you have to modify the spaceSize towards the end of the loop to
	CGSize spaceSize = elementSize.width == 0 ? (CGSize) {0,0} : [@&quot; &quot; sizeWithFont:styleFont];
	position.x += elementSize.width + spaceSize.width;
That&#039;s about all. Otherwise, great class, thanks</description>
		<content:encoded><![CDATA[<p>This is because when the text is split in word elements, the new lines are are not taken into account. The text is split by occurrences of the white space so for &#8220;\nBeginning of line&#8221; you will end up with an array of [@"\nBeginning", @"of", @"line"]. First word will be rendered with a UILabel and will have double the height, eventually overlapping other text bellow.</p>
<p>To fix this, first modify the &#8220;elements&#8221; array to be a NSMutableArray instead of just NSArray.<br />
Then, modify the setText: selector to read the following:<br />
- (void)setText:(NSString *)value {<br />
    [elements release];</p>
<p>    elements = [NSMutableArray array];<br />
    for (NSString *element in [value componentsSeparatedByString:@" "])<br />
    {<br />
        if ([element rangeOfString:@"\n"].location != NSNotFound)<br />
        {<br />
            NSArray *temp = [element componentsSeparatedByString:@"\n"];<br />
            for (NSString *tempEl in temp)<br />
            {<br />
                [elements addObject: ([tempEl length] == 1 ? @&#8221;\n&#8221; : tempEl)];<br />
            }<br />
        }<br />
        else<br />
        {<br />
            [elements addObject:element];<br />
        }<br />
    }</p>
<p>	[elements retain];</p>
<p>	[self setNeedsLayout];<br />
}</p>
<p>In the layoutSubviews override, after the elementSize and controlSize are calculated, replace the if statement to take into account that a new line will have a width of zero, and to instruct the rendering to increase the y component of the location</p>
<p>if(elementSize.height &gt; controlSize.height || elementSize.width == 0) {<br />
	position.y += controlSize.height;<br />
	position.x = 0.0;<br />
}</p>
<p>By now everything works pretty well, but there will be an extra space in front of the first words after the new line, so you have to modify the spaceSize towards the end of the loop to</p>
<p>	CGSize spaceSize = elementSize.width == 0 ? (CGSize) {0,0} : [@" " sizeWithFont:styleFont];<br />
	position.x += elementSize.width + spaceSize.width;</p>
<p>That&#8217;s about all. Otherwise, great class, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Animate UITableView Cell Height Change by Simon</title>
		<link>http://locassa.com/index.php/animate-uitableview-cell-height-change/#comment-543</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Mon, 02 Apr 2012 08:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.locassa.com/?p=502#comment-543</guid>
		<description>Hi Matt,
Thanks for the info, it’s interesting that you lose the edit controls with the simple two-line trick, however we’ve only ever used it in ‘display’ mode.
Thanks for taking the time to post your experience for others to read.
Simon.</description>
		<content:encoded><![CDATA[<p>Hi Matt,</p>
<p>Thanks for the info, it’s interesting that you lose the edit controls with the simple two-line trick, however we’ve only ever used it in ‘display’ mode.</p>
<p>Thanks for taking the time to post your experience for others to read.</p>
<p>Simon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Animate UITableView Cell Height Change by Matt</title>
		<link>http://locassa.com/index.php/animate-uitableview-cell-height-change/#comment-540</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Sun, 01 Apr 2012 16:25:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.locassa.com/?p=502#comment-540</guid>
		<description>In case it helps others, thought I&#039;d add this comment:
The simple block described in this post only partially worked for me:
[myTableView beginUpdates];
[myTableView endUpdates];
My table is in a sort of permanent Edit mode so that it can show re-order controls, which means I have to have a sort of custom Edit button that expands the cells and shows the deletion controls next to each one (and hides them again when the user taps the button again, when it&#039;s displaying Done instead of Edit).
The regular call I was doing to [tableView reloadData] at the end of my custom Edit button&#039;s responder wasn&#039;t animating the change, which is why I went searching and found Simon&#039;s post on this site in the first place.  For some reason, while reloadData was properly displaying the table with the enlarged cells and deletion controls, it wasn&#039;t creating any sort of transition to it - very jarring and un-iphone-like!
After I implemented Simon&#039;s block, I had animation... but no deletion controls!  Evidently, the beginUpdates/endUpdates block successfully animates changes to cell heights, but because my action isn&#039;t part of the normal series of steps that requires animations (steps like didSelectRowAtIndexPath or the wholesale reloadData), it wouldn&#039;t call the method triggering the display of deletion controls, ie:
 - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
I&#039;m pretty sure it&#039;s because I&#039;m trying to animate a change to the row height for my entire table in response to a &quot;custom event&quot; (eg tapping a button outside the table itself that also isn&#039;t the standard Edit or + button, instead of a row inside the table), in combination with the fact that my table is already in Edit mode, that the beginUpdates/endUpdates solution isn&#039;t sufficient.  My presumption is that a method like didSelectRowAtIndexPath already sets up (or &quot;primes&quot;) the table for animation just for the selection part, although I&#039;m not experienced enough to explain it.  And with [tableView reloadData] refusing to animate, I thought I had run out of options.  It was in consulting the Apple developer docs that I found something that finally worked - a happy medium, if you will, that married what I needed of reloadData and beginUpates/endUpdates:
[tableView reloadSections:sectionsForReload withRowAnimation:UITableViewRowAnimationAutomatic];
Since my table was just one section, I defined sectionsForReload as:
NSIndexSet *sectionsForReload = [[NSIndexSet alloc] initWithIndex:0];
This can also be done on a row-by-row basis.  I would of course be curious to know what other experiences people have had in this particular situation!</description>
		<content:encoded><![CDATA[<p>In case it helps others, thought I&#8217;d add this comment:</p>
<p>The simple block described in this post only partially worked for me:<br />
[myTableView beginUpdates];<br />
[myTableView endUpdates];</p>
<p>My table is in a sort of permanent Edit mode so that it can show re-order controls, which means I have to have a sort of custom Edit button that expands the cells and shows the deletion controls next to each one (and hides them again when the user taps the button again, when it&#8217;s displaying Done instead of Edit).</p>
<p>The regular call I was doing to [tableView reloadData] at the end of my custom Edit button&#8217;s responder wasn&#8217;t animating the change, which is why I went searching and found Simon&#8217;s post on this site in the first place.  For some reason, while reloadData was properly displaying the table with the enlarged cells and deletion controls, it wasn&#8217;t creating any sort of transition to it &#8211; very jarring and un-iphone-like!</p>
<p>After I implemented Simon&#8217;s block, I had animation&#8230; but no deletion controls!  Evidently, the beginUpdates/endUpdates block successfully animates changes to cell heights, but because my action isn&#8217;t part of the normal series of steps that requires animations (steps like didSelectRowAtIndexPath or the wholesale reloadData), it wouldn&#8217;t call the method triggering the display of deletion controls, ie:</p>
<p> &#8211; (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath</p>
<p>I&#8217;m pretty sure it&#8217;s because I&#8217;m trying to animate a change to the row height for my entire table in response to a &#8220;custom event&#8221; (eg tapping a button outside the table itself that also isn&#8217;t the standard Edit or + button, instead of a row inside the table), in combination with the fact that my table is already in Edit mode, that the beginUpdates/endUpdates solution isn&#8217;t sufficient.  My presumption is that a method like didSelectRowAtIndexPath already sets up (or &#8220;primes&#8221;) the table for animation just for the selection part, although I&#8217;m not experienced enough to explain it.  And with [tableView reloadData] refusing to animate, I thought I had run out of options.  It was in consulting the Apple developer docs that I found something that finally worked &#8211; a happy medium, if you will, that married what I needed of reloadData and beginUpates/endUpdates:</p>
<p>[tableView reloadSections:sectionsForReload withRowAnimation:UITableViewRowAnimationAutomatic];</p>
<p>Since my table was just one section, I defined sectionsForReload as:<br />
NSIndexSet *sectionsForReload = [[NSIndexSet alloc] initWithIndex:0];</p>
<p>This can also be done on a row-by-row basis.  I would of course be curious to know what other experiences people have had in this particular situation!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apple App Store Approval Process Explained by Tamil</title>
		<link>http://locassa.com/index.php/apple-app-store-approval-process-explained/#comment-523</link>
		<dc:creator>Tamil</dc:creator>
		<pubDate>Tue, 27 Mar 2012 06:14:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.locassa.com/?p=726#comment-523</guid>
		<description>We have developed a ipad application using SDK 4.2 and planning to submit the application to app store. The application was tested in iOS 4.2, 4.3 and 5.0. Is it necessary that the application should be developed using SDK 5 to apple approve?</description>
		<content:encoded><![CDATA[<p>We have developed a ipad application using SDK 4.2 and planning to submit the application to app store. The application was tested in iOS 4.2, 4.3 and 5.0. Is it necessary that the application should be developed using SDK 5 to apple approve?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Temporary Storage In Apple&#8217;s CoreData by Shiki</title>
		<link>http://locassa.com/index.php/temporary-storage-in-apples-coredata/#comment-463</link>
		<dc:creator>Shiki</dc:creator>
		<pubDate>Tue, 06 Mar 2012 11:09:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.locassa.com/?p=444#comment-463</guid>
		<description>Thanks for this! I used this technique to convert JSON data to disconnected entity classes.</description>
		<content:encoded><![CDATA[<p>Thanks for this! I used this technique to convert JSON data to disconnected entity classes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Animate UITableView Cell Height Change by raptor</title>
		<link>http://locassa.com/index.php/animate-uitableview-cell-height-change/#comment-456</link>
		<dc:creator>raptor</dc:creator>
		<pubDate>Tue, 28 Feb 2012 08:23:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.locassa.com/?p=502#comment-456</guid>
		<description>can u explain me this problem in code . i am new to programming</description>
		<content:encoded><![CDATA[<p>can u explain me this problem in code . i am new to programming</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Interactive Rich Text UILabel by Simon</title>
		<link>http://locassa.com/index.php/interactive-rich-text-uilabel/#comment-262</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Wed, 18 Jan 2012 13:22:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.locassa.com/?p=817#comment-262</guid>
		<description>I had a quick look but couldn&#039;t find anything. Sometimes there is a unicode control character inserted at the start to indicate writing direction, however I am not sure how this works with mixed format strings.</description>
		<content:encoded><![CDATA[<p>I had a quick look but couldn&#8217;t find anything. Sometimes there is a unicode control character inserted at the start to indicate writing direction, however I am not sure how this works with mixed format strings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Animate UITableView Cell Height Change by MachOSX</title>
		<link>http://locassa.com/index.php/animate-uitableview-cell-height-change/#comment-253</link>
		<dc:creator>MachOSX</dc:creator>
		<pubDate>Sat, 14 Jan 2012 08:21:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.locassa.com/?p=502#comment-253</guid>
		<description>Exactly what I was looking for! Thank you! :)</description>
		<content:encoded><![CDATA[<p>Exactly what I was looking for! Thank you! <img src='http://locassa.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Interactive Rich Text UILabel by Jeremy</title>
		<link>http://locassa.com/index.php/interactive-rich-text-uilabel/#comment-246</link>
		<dc:creator>Jeremy</dc:creator>
		<pubDate>Thu, 12 Jan 2012 14:42:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.locassa.com/?p=817#comment-246</guid>
		<description>Thanks Simon,
I haven&#039;t been able to figure out how to get writing direction from an NSString, do you have any suggestions?
In my case I&#039;m getting this unicode string from an API, \u0648\u0634 \u0639\u0646\u062f\u0643, which the system renders in Arabic, but backwards.  The issue becomes more complex if there is a mix of English and Arabic words in the string.</description>
		<content:encoded><![CDATA[<p>Thanks Simon,<br />
I haven&#8217;t been able to figure out how to get writing direction from an NSString, do you have any suggestions?<br />
In my case I&#8217;m getting this unicode string from an API, \u0648\u0634 \u0639\u0646\u062f\u0643, which the system renders in Arabic, but backwards.  The issue becomes more complex if there is a mix of English and Arabic words in the string.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced (Requested URI is rejected)

Served from: locassa.com @ 2012-05-19 16:43:09 -->
