Re: UILabel's sizeToFit - only on re-used cells

2014-01-15 Thread Matt Neuburg
On Tue, 14 Jan 2014 11:44:46 -0800, Quincey Morris said: >The size of the cell you get from dequeueReusableCellWithIdentifier is >meaningless until the cell gets added to the table view Yes, but the size of the cell you get from `dequeueReusableCellWithReuseIdentifier:forIndexPath:` is meanin

Re: UILabel's sizeToFit - only on re-used cells

2014-01-15 Thread Torsten Curdt
> > The size of the cell you get from dequeueReusableCellWithIdentifier is > meaningless until the cell gets added to the table view, which doesn’t > happen until you return the cell from the delegate method you’re in. > Not sure I understand why the cell size matters though. All views/labels have

Re: UILabel's sizeToFit - only on re-used cells

2014-01-14 Thread Quincey Morris
On Jan 14, 2014, at 11:20 , Torsten Curdt wrote: >MyCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyCell"]; > > I then setup the cell > >cell.myLabel.text = @"test"; >cell.myLabel.textColor = [UIColor blackColor]; > > and resize the label to use the proper space for t

UILabel's sizeToFit - only on re-used cells

2014-01-14 Thread Torsten Curdt
I am seeing a weird behavior and I have hard time tracking down what's going on. Any suggestion on how to pinpoint the problem would be great. I am running out of ideas. I have UITableView where I dequeue the cells. MyCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyCell"]; I th