Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I just downloaded your project &amp; found this section of code in <code>didSelectRowAtIndexPath</code> delegate where <code>reloadRowsAtIndexPaths</code> is used. </p> <pre><code>[tableView reloadRowsAtIndexPaths:indicesToReload withRowAnimation:UITableViewRowAnimationAutomatic]; [tableView beginUpdates]; [tableView endUpdates]; </code></pre> <p>instead of the above why don't you try this?</p> <pre><code>[tableView beginUpdates]; [tableView reloadRowsAtIndexPaths:indicesToReload withRowAnimation:UITableViewRowAnimationAutomatic]; [tableView endUpdates]; </code></pre> <p>The reason i am suggesting this is that I believe <code>reloadRowsAtIndexPaths:...</code> only works when wrapped inbetween calls to:</p> <pre><code>- (void)beginUpdates; - (void)endUpdates; </code></pre> <p>Outside of that, behavior is undefined and as you've discovered, fairly unreliable. Quoting relevant part of "<a href="http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/TableView_iPhone/AboutTableViewsiPhone/AboutTableViewsiPhone.html" rel="nofollow">Table View Programming Guide for iPhone OS</a>":</p> <blockquote> <p>To animate a batch insertion and deletion of rows and sections, call the insertion and deletion methods within an animation block defined by successive calls to beginUpdates and endUpdates. If you don’t call the insertion and deletion methods within this block, row and section indexes may be invalid. beginUpdates...endUpdates blocks are not nestable.</p> <p>At the conclusion of a block—that is, after endUpdates returns—the table view queries its data source and delegate as usual for row and section data. Thus the collection objects backing the table view should be updated to reflect the new or removed rows or sections.</p> <p>The reloadSections:withRowAnimation: and reloadRowsAtIndexPaths:withRowAnimation: methods, which were introduced in iPhone OS 3.0, are related to the methods discussed above. They allow you to request the table view to reload the data for specific sections and rows instead of loading the entire visible table view by calling reloadData.</p> </blockquote> <p>There could be other valid reason but let me mull on this a bit, since i have your code too I could muck around with it. Hopefully we should figure it out...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload