【发布时间】:2014-10-07 15:21:15
【问题描述】:
需要帮助。
在superview框架外创建一个菜单。
menu=[[MyView alloc]initWithFrame:CGRectMake(0, -100, 320, 100)];
当菜单移动到屏幕上时,superview 也会移动。
-(void)openMenu:(UIView *)view
{
[UIView animateWithDuration:0.5
delay:0.1
options: UIViewAnimationOptionBeginFromCurrentState
animations:^
{
CGRect frame = menu.frame;
CGRect viewFrame = view.frame; //superview
frame.origin.y=-80;
viewFrame.origin.y=65;
menu.frame = frame;
view.frame = viewFrame;
}
completion:^(BOOL finished)
{
}];}
菜单有 5 个按钮。
问题在于它们不响应触摸事件。我读到有必要替换:hitTest:withEvent:,但我不明白该怎么做。
谢谢!
【问题讨论】:
-
你想在动画状态下触摸它吗?
-
不,之后。动画停止时。
-
您能解释一下您的需求吗?什么是菜单,什么是视图
标签: ios objective-c