There are three UIView *view1,view2 , view3;
Now, view1 have to be shown at both of view2 and view3 at the same time. But as usually, one view could be insert at only one view…
Is there any method to insert one view at two different view ?
There are three UIView *view1,view2 , view3; Now, view1 have to be shown at
Share
No. A UIView instance can only be a subview of exactly 1 other UIView instance.
You need to create 2 UIView instances. To avoid code duplication, you could subclass UIView:
and create 2 instances of MyView1, and add them as subviews of view2 and view3 respectively: