Iphone UIButton不';动画后我不能工作
当用户点击“下一步”按钮时,另一个按钮应消失,下一步按钮本身应位于原来的位置,并且应显示一个tableView。这在1.0秒内发生。问题是,在动画之后,UIButton失去了功能。我不能按它,但它是可见的。它是主视图的子视图。 这是我的密码:Iphone UIButton不';动画后我不能工作,iphone,ios,Iphone,Ios,当用户点击“下一步”按钮时,另一个按钮应消失,下一步按钮本身应位于原来的位置,并且应显示一个tableView。这在1.0秒内发生。问题是,在动画之后,UIButton失去了功能。我不能按它,但它是可见的。它是主视图的子视图。 这是我的密码: - (IBAction)nextStep:(id)sender { NSLog(@"Test"); //Check if the other button is in the view if ([theNewPhotoButt
- (IBAction)nextStep:(id)sender {
NSLog(@"Test");
//Check if the other button is in the view
if ([theNewPhotoButton isDescendantOfView:self.view]) {
[UIView animateWithDuration:1.0
animations:^{
theNewPhotoButton.frame = CGRectMake(-1000, theNewPhotoButton.frame.origin.y, theNewPhotoButton.frame.size.width, theNewPhotoButton.frame.size.height);
} completion:^(BOOL finished) {
CGRect screenSize = [[UIScreen mainScreen] bounds];
[self.view addSubview:nextButton];
} else if ([tagView isDescendantOfView:self.view]) {
if (tagProductArray != nil) {
imageView.frame = CGRectMake(10, 30, 100, 100);
tagView.frame = CGRectMake(-1000, tagView.frame.origin.y, tagView.frame.size.width, tagView.frame.size.height);
[self.view addSubview:nextButton];
[tagView removeFromSuperview];
} else {
}
}
您在哪里定义下一个按钮的框架?按钮顶部是否有另一个视图?按钮框是什么?是的,它是隐藏的。对不起