My intension is to create a new viewcontroller with some controls(buttons, labels etc) of the current controllrer view.
//Get all the controls
NSArray* array =[[NSArray alloc]init];
array=[self.view subviews];
for(int i =0 ;i<array.count ;i++)
{
// UIView *subview = (UIView *)[array objectAtIndex:i];
UIView *subview = (UIView *)[array objectAtIndex:i] ;
..
[nextview.view insertSubview:subview atIndex:i];
}
But i found out when new viewcontroller view dismiss all the controls of the parent controls also disappering. how can i copy UIView * object to another?