views:

436

answers:

0

in my iPhone application two different view is there. it is set two different viewControll class.

i mean i displaying 1 view by this code.

BacodeViewController *proview=[[BacodeViewController alloc]initWithNibName:@"PorpertyP" bundle:nil]; [self setProPView:proview]; [proview release]; [proview.view removeFromSuperview]; [self.window addSubview:[proview view]];

and another one is UIView *Test=[[MyViewController alloc]getmainView]; // ***

[Test.view removeFromSuperview];
[self.window addSubview:Test];

//*** here getmainView is i was implemented.

-(id)getmainView{ retrun self.view; }

my problem is that.. when i switch from Test view to PorpertyP view.. the test view remain in the back side of PorpertyP view.. how to remove this...

both view is add same window .. is there any way to remove previous view from window /

thanks and regads..