ios - What happens with constraints when a view is removed -


the question have simple couldn't find information in documentation.

what happens layout constraints when view removed view hierarchy (or moved view)?

for example, let's have container c subviews a , b. container c holds constraints. call [a removefromsuperview]. happens constraints a?

what happens if add a c again?

the constraints removed. if add again, have make new constraints it, or if save constraints before remove a, can add them back. when this, save constraints view called view1:

self.portraitconstraints = [nsmutablearray new]; (nslayoutconstraint *con in self.view.constraints) {     if (con.firstitem == self.view1 || con.seconditem == self.view1) {        [self.portraitconstraints addobject:con];     } } 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -