【发布时间】:2015-03-25 03:47:54
【问题描述】:
当一个按钮被点击时,我会显示一个UIView,它会动画并向上滑动。
现在,当我单击按钮时,方法 buttoncall 被调用。
我想用动画关闭(向下移动/关闭)视图。
我该怎么做?
v = [[MyView alloc] initWithFrame:mycell.bounds];
[v.flipLowButton addTarget:self action:@selector(buttoncall:) forControlEvents:UIControlEventTouchUpInside];
[mycell addSubview:v];
CGRect r=v.frame;
r.origin.y= mycell.frame.size.height;
v.frame=r;
rect.origin.y=r.origin.y-r.size.height;
[UIView animateWithDuration:.2 animations:^{
v.frame=r; }];
- (void) buttoncall:(UIButton *)sender {
// How to bring down the menu.
}
【问题讨论】:
-
与显示菜单的操作相反。
标签: ios objective-c