I am new in iOS application Development and i need help on UItableview. As i am populating the table-view with json data.I am also Using Customized Tableviewcell also. I am not
In Swift
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let cell = tableView.cellForRow(at: indexPath) as! NotesCell!
let value = cell?.lblDetail.text
}
You may have to implement the method:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
which is called each time a row is selected, and inside that method:
Simpletablecell *cell = (Simpletablecell *)[tableView cellForRowAtIndexPath:indexpath];
lbluid.text = cell.lbl4.text;
The method:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
is called the the table view is loading it's cells to be displayed, which is why you lbluid.text
is only changing when the table view is scrolled.