Getting the updated frame with AutoLayouts it is a problem, that I know and been through it's solutions. All solutions are very much efficient but my problem has a limp.
Things I have done :
I have a UIView that I needed to change size of it at demand so I supplied a key setTranslatesAutoresizingMaskIntoConstraints
as YES
. Because I have created constraints for this UIView and constraints were not letting me change/reflect the frame. Now I am successfully able to change the frame but new problem is view
is not giving rendered cordinates [origin(x,y)]. Origin values are not updated.
If I remove setTranslatesAutoresizingMaskIntoConstraints
then it works. But I need it.
I have tried other solutions like updating the UI at call using - [view setNeedsLayout] and [view layoutIfNeeded]
or delaying the retrieval of rendered frames using -(void)viewDidLayoutSubviews
But nothing works.