Note that there are some explanatory texts on larger screens.

plurals
  1. POCrashing the application when Run on IOS 5.0 by clicking the table view;
    primarykey
    data
    text
    <p>i have done the code to show the fading of the cell when click on the Division, the code works well for the IOS 3.0 and 4.o the code looks like</p> <pre><code>- (NSArray*)indexPathsInSection:(NSInteger)section { NSMutableArray *paths = [NSMutableArray array]; NSInteger row; for ( row = 0; row &lt; [self numberOfRowsInSection:section]; row++ ) { [paths addObject:[NSIndexPath indexPathForRow:row inSection:section]]; } return [NSArray arrayWithArray:paths]; } - (void)toggle:(BOOL*)isExpanded section:(NSInteger)section { *isExpanded = !*isExpanded; [Table beginUpdates]; if ( !*isExpanded ) { NSArray *paths = [self indexPathsInSection:section]; [Table deleteRowsAtIndexPaths:paths withRowAnimation:UITableViewRowAnimationFade]; } else { NSArray *paths = [self indexPathsInSection:section]; [Table insertRowsAtIndexPaths:paths withRowAnimation:UITableViewRowAnimationRight]; } [Table endUpdates]; [Table reloadData]; } - (NSInteger)numberOfRowsInSection:(NSInteger)section { if(kMAX_SECTION_ROWS[section] == 0) { return 1; } else { return kMAX_SECTION_ROWS[section]; } //return 0; } - (void)toggleSection:(id)sender { NSLog(@"button %d is clicked.",[sender tag]); int i = [sender tag]; if(!isSectionExpanded[i]){ NSLog(@"expanded"); hString[i].arrowImage.image = [UIImage imageNamed:@"downarrow.png"]; } else { NSLog(@"not expanded"); hString[i].arrowImage.image = [UIImage imageNamed:@"arrowgrean.png"]; } [self toggle:&amp;isSectionExpanded[i] section:i]; } </code></pre> <p>when i run the code in IOS 5 it shows me error</p> <pre><code> Assertion failure in -[_UITableViewUpdateSupport _computeRowUpdates],/SourceCache/UIKit_Sim/UIKit-1912.3/UITableViewSupport.m:386 </code></pre> <p>if any clue then reply thanks</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.
 

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