Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
你好在我的应用程序中我模拟幻灯片视图并使用此代码
[UIView beginAnimations: nil context:nil]; [UIView setAnimationDuration: 0.5]; [UIView commitAnimations];
不幸的是,新视图在获取窗口之前拦截了触摸:如果我双击,第二次单击工作新视图我检查此视图的框架它等于窗口的框架
如果我关闭动画它工作正常。但我需要动画效果
请帮我找到正确的决定)
尝试使用UIView动画块。最初禁用新视图上的触摸。然后动画并在完成块中,启用触摸。
UIView
//disable touch on the slide view [UIView animateWithDuration:0.5 animations:^{ //.. animate here } completion:^(BOOL finished){ //enable touch on the new view }]