CustomCell を使用した UITableView があります。カスタム セルには、UILabel と UIImageView が含まれています。
ユーザーがセルを押したときに、通常の UITableView セルからテキストを取得し、文字列に格納できることをオンラインで見ました。
しかし、カスタム セルを使用している場合、どうすればこれを行うことができるでしょうか? UILabel の名前は「type_label」で、CustomCell XIB のヘッダー ファイルで定義されているためです。
したがって、Xcodeでは使用できません:
cell.type_label.text"
次の関数では:
-(void)tableView:(UITableView *) tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
ありがとう、ダン。