0

Good day everyone! I have a typical problem where I have a superview with tons of subviews and constraints and i need to migrate them to another superview while saving all constraints relative both to their sizes and to superview.

There were two answers:

1) XCode - Is there a way to drag a component from one view to another without losing its frame? -saves coordinates.

2) Move all subviews to container view keeping positions and constraints - saves constraints relative to size (width, height), but doesn't save their relation to superview.

Is there any other 3rd easy solution which passes size constraints, position constraints and positions? Or probably i could somehow in interface builder change the type from custom scrollView to containerView while saving everything?

Community
  • 1
  • 1
Morckovka
  • 103
  • 13
  • I am afraid you don't have any way to do this. In future it's better to place subviews to intermediate superview for simpler migration if needed – hash3r Sep 11 '15 at 12:11
  • @hash3r Such a shame - now i have to remake all constraints for already existing project with more than 100 xibs manually((( (Project i was assigned to) – Morckovka Sep 11 '15 at 12:18
  • that's a pity, you can find author and make him/her a suggestion to improve knowledges about auto layout – hash3r Sep 11 '15 at 12:25

0 Answers0