创建 myView:
UIVIew *myView = [[UIView alloc] initWithFrame:CGRectMaker(0,0,100,100)];
[anyView addSubview:myView];
[myView release];
销毁myView;
[myView removeFromSuperview];
在view中创建button:
UIButton *btn = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain];
btn.frame = CGRectMake(60,60, 60, 60);
[self.view addSubview:btn];
在view中销 毁button:
[btn removeFromSuperview];
[btn release];