ios - How to add specific view to uitableviewcell? -
i have personcell
xib
, .h
, .m
files , person's characteristics. so, depending on personcell.state
, want show different number , kind of characteristics.
i want use specific parameterview
titlelabel
, constantlabel
, can add parameterviews for-in array
. can't use constraints
in code, coz of cell reuse
.
how that? see stupid way - add every characteristic view personcell
, depending on state, show , hide them. there 50+ different characteristics.
you try use tableview
instead of array of views. example, personcell
have tableview inside, each cell contains parameterview
.
from array have, implement uitableviewdatasource
in personcell
. think pretty simple solution when personcell
depends on state.
let me know if have questions or need more specific information.
Comments
Post a Comment