Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You commented out the line that sets the data source. If a data source is not set then cellForRowAtIndexPath: will not be called.</p> <p>Your current viewDidLoad code is:</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; newsTable = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] bounds] style:UITableViewCellStyleDefault]; newsTable.delegate = self; //newsTable.dataSource = self; myCollapseClick.CollapseClickDelegate = self; [myCollapseClick reloadCollapseClick]; // If you want a cell open on load, run this method: [myCollapseClick openCollapseClickCellAtIndex:0 animated:YES]; /* // If you'd like multiple cells open on load, create an NSArray of NSNumbers // with each NSNumber corresponding to the index you'd like to open. // - This will open Cells at indexes 0,2 automatically NSArray *indexArray = @[[NSNumber numberWithInt:0],[NSNumber numberWithInt:2]]; [myCollapseClick openCollapseClickCellsWithIndexes:indexArray animated:NO]; */ } </code></pre> <p>Change it to</p> <pre><code> - (void)viewDidLoad { [super viewDidLoad]; newsTable = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] bounds] style:UITableViewCellStyleDefault]; newsTable.delegate = self; newsTable.dataSource = self; myCollapseClick.CollapseClickDelegate = self; [myCollapseClick reloadCollapseClick]; // If you want a cell open on load, run this method: [myCollapseClick openCollapseClickCellAtIndex:0 animated:YES]; /* // If you'd like multiple cells open on load, create an NSArray of NSNumbers // with each NSNumber corresponding to the index you'd like to open. // - This will open Cells at indexes 0,2 automatically NSArray *indexArray = @[[NSNumber numberWithInt:0],[NSNumber numberWithInt:2]]; [myCollapseClick openCollapseClickCellsWithIndexes:indexArray animated:NO]; */ } </code></pre>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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