【发布时间】:2017-09-14 11:28:09
【问题描述】:
我正在尝试用动画取消隐藏 UIView,但它不适用于 iphone 模拟器 5。在除 5 和 5s 之外的所有其他模拟器上取消隐藏后,视图看起来很好。
可能是什么原因。无法检测到问题。有什么帮助吗?
/*To unhide*/
self.view4.hidden=NO;
[UIView animateWithDuration:0.5 animations:^{
self.view4.frame = CGRectMake(2, 70, 70, 300);
self.view4.alpha = 1.0f;
} completion:^(BOOL finished) {
}];
//for showing view3
self.view3.hidden=NO;
[UIView animateWithDuration:0.5 animations:^{
[self.view3 setFrame:CGRectMake(0, 303, 320, 95)];
self.view3.alpha = 1.0f;
} completion:^(BOOL finished) {
}];
在按钮上单击 view3 没有出现 :(。view4 看起来很好。我也尝试通过更改帧值但没有进展。在隐藏和减少 alpha 以使 view3 消失时,view3 出现在屏幕上的动画,但不是显示它。
【问题讨论】:
标签: ios objective-c animation uiview xcode8