I need add to my active main view a new subview. And this subview should be with all content which placed on main view. Subview has a frame = view.frame / 2.
I trying implement some solutions (below), but there are no results ((
First off
CGRect frame = CGRectMake(100, 140, 250, 250);
UIView *view = [self.view copy];
view.frame = frame;
[self.view addSubview:view ];
[view release];
Then
UIView *View = [[[NSBundle mainBundle] loadNibNamed:@"CurrentTemplate" owner:self options:nil] objectAtIndex:0];
View.frame = CGRectMake(100, 140, 250, 250);
[self.view addSubview:view ];
[view release];
Any ideas?
If I understand your question correctly, you want to move all the subviews of self.view into a new view and then add that new view back into self.view?
Perhaps something like this might do it:
Hope this helps,
Sam