---
title: "How to set component from one superview to another without loosing frame & position in Xcode?"  
description: "How to set component from one superview to another without loosing frame & position in Xcode?"  
author: "Anonymous User"  
published: 2016-04-04  
updated: 2016-04-05  
canonical: https://www.mindstick.com/forum/34096/how-to-set-component-from-one-superview-to-another-without-loosing-frame-position-in-xcode  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# How to set component from one superview to another without loosing frame & position in Xcode?

I want to move a [component](https://www.mindstick.com/articles/12262/learn-how-to-make-a-component-in-magento-2) from one superview to another superview in our application. So, my [question](https://www.mindstick.com/blog/23175/how-to-solve-neet-question-paper-in-less-time) is can we move the component without loosing [frame](https://www.mindstick.com/articles/749/html-frames)/position to be reset. Because in [Xcode](https://www.mindstick.com/blog/10962/required-resources-in-xcode-project) the [default](https://www.mindstick.com/interview/12771/what-is-the-importance-of-default-resources) behaviour when doing this appears in center the [view](https://yourviews.mindstick.com/view/84701/layoffs-in-google-india-2023-view) being moved [vertically and horizontally](https://www.mindstick.com/forum/156630/center-an-element-vertically-and-horizontally-with-the-help-of-bootstrap) in its new superview, while preserving its dimensions.

So, [please tell me](https://www.mindstick.com/forum/33900/please-tell-me-what-are-the-technique-to-content-optimization) how can I move the component without loosing frame/position of component in another view?

## Replies

### Reply by Tarun Kumar

If you want to move any component from one view to another view the you need to Embed it after moving the component. Here, I am telling you the shortest solution, follow it:\
1. FirstOfAll move the component,\
2. Select the component that you are moved.\
2. Now, go to you Xcode Tool bar, and select Editor > click on 'Embed In' > and after select the view type to embed in.

I hope it will solve your problem.


---

Original Source: https://www.mindstick.com/forum/34096/how-to-set-component-from-one-superview-to-another-without-loosing-frame-position-in-xcode

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
