objective c - Unable to set top margin NSLayout Constraint programatically in iOS? -
i trying set top margin constraint not work.i have custom cell in have 2 labels.i want give top spacing dynamic @ run time between labels have set constraint of top margin & have made outlet of & using below code update top margin.
self.view.translatesautoresizingmaskintoconstraints = no; self.customcell.nslc_first_comment_margin.constant=-21; [self.customcell.first_comment layoutifneeded];
please tell how solve problem?
edit: code works if write code inside cellforrowatindexpath not work under heightforrowatindexpath?can please tell exact reason behaviour.
Comments
Post a Comment