を作成し、xib
次のコードでビュー内に表示しました。
NSArray *xibContents =
[[NSBundle mainBundle] loadNibNamed:@"PickupAddressView"
owner:self
options:nil];
UIView *view = [xibContents objectAtIndex:0]; // Safer than objectAtIndex:0
//UIView *subView=[view.subviews objectAtIndex:0];
[view setFrame:CGRectMake(0.0f, 0.0f, 0.0f, 0.0f)];
CGRect tempFrame=view.frame;
tempFrame.size.width=300;//change acco. how much you want to expand
tempFrame.size.height=350;
[UIView beginAnimations:@"" context:nil];
[UIView setAnimationDuration:0.2];
view.frame=tempFrame;
//[UIView commitAnimations];
[view setFrame:CGRectMake(10.0f, 90.0f, 300.0f, 350.0f)];
[view setBackgroundColor:
[UIColor colorWithPatternImage:
[UIImage imageNamed:@"Register_bg"]]];
[UIView commitAnimations];
[view removeFromSuperview];
[self.view addSubview:view];
私は を使用してUIStoryboard
おり、これを作成しxib
、次のコードから示しました。
このビューを削除するにはどうすればよいですか。が呼び出されている がありUIButton
ます。IBAction
ありがとう