Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rup28aug

macrumors newbie
Original poster
Oct 22, 2008
12
0
hi all,
i am new to iphone programming
i fill my table view with 10 rows(cell). I add four subview to cell object. Now if user select any row then we can get row of table(via indexPath.row of didSelectRowAtIndexPath method) but how can i access the selected cell and value of particular subview of cell? I know i am doing little mistake(or confuse) but i am unable to caught this mistake?

Please suggest
 

detz

macrumors 65816
Jun 29, 2007
1,051
0
When you create the cells and add your uiviews to that cell you should tag them.

myLabel.tag = 1;


then, when you get that cell back you can use something like this to get that label back.

myLabel = (UILabel *)[cell.contentView viewWithTag:1];
 

rup28aug

macrumors newbie
Original poster
Oct 22, 2008
12
0
myLabel = (UILabel *)[cell.contentView viewWithTag:1];

sir,
thanks for your reply

i already perform this task. but my problem is that how can i get cell? i am unable to get selected cell. i want to like something

TableViewCell *temp=selectedCell(or clickedCell);

here how can get selected cell(or ClickedCell)?.I know selected and clicked are different event. so one more question arise here. What event i used when user supposed to tap any cell item
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.