UI view frame not refreshing in UItableview ios -


i trying set frame uiview @ runtime frame not updating reason.

    cgrect newframe = cell.candidatespollprogress.frame;     float c = [[dcandidatespollprogress objectatindex:indexpath.row]floatvalue];      newframe.size.width = (c/100)*120;     newframe.size.height = 8;     [cell.candidatespollprogress setframe:newframe];     cell.candidatespollprogress.backgroundcolor = [uicolor bluecolor]; 

i debugged , frame contains actual values not being updated.any ideas?

if used autolayout it's did't work. have update constraints below

change constraints value using take custom cell & provide iboutlet view custom cell class header file

@property (strong, nonatomic) iboutlet nslayoutconstraint *viewheight_constraint; 

in cell row or action below

cell.viewheight_constraint.constant = 40.0; //value   [cell.contentview setneedsupdateconstraints];   [cell.contentview layoutifneeded]; 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -