views:

56

answers:

2

Hello,

I have a Table who's cells are subclassed instances of UITableViewCell. My subclass has touchesMoved, touchesBegan, etc, so what I'm trying to do is alter an individual cell based upon a series of touches that I define. I am successful in capturing the touch sequence, and I can change the frame of the cell, but I can't seem to get the cell's text to change. I've tried various in my subclass, including:

CGRect frame;
frame.size.height = 300;
self.frame = frame;
self.textLabel.text = @"meep";

The cell height changes as planned, but the text doesn't. Is there a better way to do this? Am I missing something obvious?

Thanks in advance,

John

A: 

reload the Data after all stuff. definitely work?

sandy
this would change my approach entirely: set a global flag, and reload the data, and then add conditions in cellForRowAtIndexPath and friends to render differently if the flag is set. Otherwise, all it will do is reload the table in its original state.
Make your code generic . Not hard code. it definitely work.
sandy
A: 

Have you tried to call

[self setNeedsDisplay];

after applying your changes?

Daniel Rinser
just tried it, it didn't help. Unless I need to override setNeedsDisplay in my subclass?