tags:

views:

27

answers:

1

How to access a table view cell in some other user defined methods other than those predefined methods for tableview???

Plz help... Thanx in advance...

A: 

for that you have to take the cell as global variable and acess it anywhere.

But remember untill you call the tableview reload method no change is gonna reflect.

So I suggest better use the cell in predefined delegate methods rather than trying to experiment (which can cause problem in consistency).

Happy Coding...

Suriya
I solved the problem...using the code below...NSIndexPath *index = [NSIndexPath indexPathForRow:indexPlay inSection:0]; [tv selectRowAtIndexPath:index animated:YES scrollPosition:UITableViewScrollPositionNone];here tv is my tableview and indexPlay is a global int variable keeping track of indexpath.rowI just wanted to change the highlighted state of the cell selected or deselected...
kool4u
then you must be specific in your question.You question was How to access a table view cell in some other user defined methodsinstead it must beHow to change the behaviour of cell selection. or as per your commentI just want to change the highlighted state of the cell selected or deselected...Any of the above question will be fine. You have asked something and expected something else. I am not wrong on my way. I have answered as per the question. Still got down vote :(
Suriya
just voted you up...
kool4u
thx.. but your accept rate is just 22% which will make people think twice for answering your question. So just go through your previously answered questions and mark them as correct if they are solved.
Suriya