I did not dig into details, just found some interesting thread; problem may be how you use translatesAutoresizingMaskIntoConstraints:
https://stackoverflow.com/questions/45466466/ibdesignable-view-with-dynamic-constraints-misplaced-children-when-rendering
and maybe this one:
https://stackoverflow.com/questions/43002115/update-constraints-for-ibdesignable
Do you have a M1 Mac ? If so, look at this:
https://developer.apple.com/forums/thread/665826
PS: Why don't you do it the other way: design in IB and adapt some constraints in code with ntheir IBObject where needed ?
Topic:
Programming Languages
SubTopic:
Swift
Tags: