objective c - to expand or collapse rows at different sections in iOS 7 -


I am working on an application where I need to expand the collapse rows in different sections. Initially I tried to expand the rows falling with one section. Now I want to be the same in more than one class.

This is my code

  - (NSInteger) numberOfSectionsInTableView: (UITableView *) tableView {// Return sections. Return [MySection Count]; } - (NSInteger) TableView: (UITableView *) table view numberofrose injection: (NSInteger) section {NSArray * rate = [mysection objectAtIndex: section]; Return [Myero Count]; } - (Zero) TableView: (UITableView *) Table View was selected SelectandPath: (NSIndexPath *) indexPath {if (selected symbol == indexPath.section) {if (selectedIndex == indexPath.row) {selectedSection = -1; SelectedIndex = -1; [Reload tableview atAndExpath: [with NSArray array object: indexPath] with RAnation: UITTViewAnimationFed]; [Tableview reload section: [NSIndexSet indexSet with Index: IndexPath. Section] R Animation: UITableViewRowAnimationFade;; Return; } // If the user taps on a different line (selected index = indexpath.ro) {NSIndexPath * prevPath = [NSIndexPath IndexPathForRow: selectedIndex in particular: SelectedScanner]; SelectedSection = indexPath.section; SelectedIndex = indexPath.row; [Reload TableviewRATI and XPath: [NSARRAARIIJIJct: PRPAP] with Row Animation: UITTualViewInAnimationFed]; [Tableview reload section: [NSIndexSet indexSet with Index: IndexPath. Section] R Animation: UITableViewRowAnimationFade;; } SelectedIndex = indexPath.row; [Reload tableview atAndExpath: [with NSArray array object: indexPath] with RAnation: UITTViewAnimationFed]; Return; } And if (Selected sign! = Index page. Section) {selectedSection = indexPath.section; [Tableview reload section: [NSIndexSet IndexSetWithIndex: selectedSection] withRowAnimation: UITableViewRowAnimationFade;; If (selectedIndex == indexPath.row) {selectedSection = -1; SelectedIndex = -1; [Reload tableview atAndExpath: [with NSArray array object: indexPath] with RAnation: UITTViewAnimationFed]; [Tableview reload section: [NSIndexSet indexSet with Index: IndexPath. Section] R Animation: UITableViewRowAnimationFade;; Return; } // If the user taps on a different line (selected index = indexpath.ro) {NSIndexPath * prevPath = [NSIndexPath IndexPathForRow: selectedIndex in particular: SelectedScanner]; SelectedSection = indexPath.section; SelectedIndex = indexPath.row; [Reload TableviewRATI and XPath: [NSARRAARIIJIJct: PRPAP] with Row Animation: UITTualViewInAnimationFed]; [Tableview reload section: [NSIndexSet indexSet with Index: IndexPath. Section] R Animation: UITableViewRowAnimationFade;; } SelectedIndex = indexPath.row; [Reload tableview atAndExpath: [with NSArray array object: indexPath] with RAnation: UITTViewAnimationFed]; } SelectedSection = indexPath.section; [Self.tableView reloadSections: [NSIndexSet IndexSetWithIndex: indexPath.section] withRowAnimation: UITableViewRowAnimationFade]; NSLog (@ "% d", selectedSection); }  

Only my rows should not be expanded in their squares

Please provide some potential solutions.

Thanks in advance

There are several sections in my table view and there are several rows in my section

that line should be tapped in

I did SelectionRowAtIndexPath I get an index path for a variable that can be accessed in the coding below ...

  - (zero) table view: (UITableView *) Table view selects the TrueType: (NSIndexPath *) Index pathway {selectedCellIndexPath = indexPath; [Reload tableview data]; }  

heightForintwithSpace

  if (selected CLEAndExpath! = Nil & amp; selected cell index: index] == NSordedSam) {height back; }  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -