Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is the rowHeight datasource method not being called
    primarykey
    data
    text
    <p>It is my fervent dream to have a UITableView with different row sizes, determined programmatically. I have read the UITableViewDataSource documentation, and I implement these methods:</p> <pre><code>- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath; - (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; </code></pre> <p>which, we can see here:</p> <pre><code>- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return (CGFloat) 200.0f; } - (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section { return 1; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell* test = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:nil ]; test.textLabel.text = @"TEST"; CGRect ffframe = test.frame; ffframe.size.height *= 200.0f; test.frame = ffframe; return test; } </code></pre> <p>These are just trying to make a simple table, with one row, and a height of 200.0. I try to return the height in the delegate method, and set it explicitly. Neither works.</p> <p>I try trapping the heightForRow method in the debugger, it seems to never be called. </p> <p>MY table rows are always the size I set in interface builder.</p> <p>I have the datasource hooked up right, otherwise it would not get the rows and textLabel right.</p>
    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. 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