3 iphone cocoa-touch objective-c ios
我是iOS开发的新手,请关注我的问题.
正如我的标题所说,
我如何隐藏和显示UIView(使用动画)UIActionSheet?
在谷歌搜索,芽没有找到有效的解决方案..
注意: 我发现以下行,但它没有帮助我.
请尝试以下代码:
- (IBAction)showTapped:(id)sender {
hideButton.enabled=YES;
showButton.enabled=NO;
[UIView animateWithDuration:.5 animations:^{
subView.frame=CGRectMake(0, 225, subView.frame.size.width, subView.frame.size.height);
}];
}
- (IBAction)hideTapped:(id)sender {
hideButton.enabled=NO;
showButton.enabled=YES;
[UIView animateWithDuration:.5 animations:^{
subView.frame=CGRectMake(0, 480, subView.frame.size.width, subView.frame.size.height);
}];
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2613 次 |
| 最近记录: |