for uitableviewcontroller in storyboard created custom cell, several text labels, want represent different data in records. how select various textlabels (i set each of labels want change different tags not sure go here) change.
you can tags, prefer custom subclass of uitableviewcell. need define iboutlets in custom class's .h file -- don't need code @ in .m file. change class of cell subclass, , hook outlets labels in cell. in code, can refer them standard cell. if outlets label1 , label2, then:
cell.label1.text = .... cell.label2.text = ...
if want use tags, can use method, viewwithtag: reference label.
uilabel = *alabel = (uilabel *)[cell.contentview viewwithtag:1];
Comments
Post a Comment