gpt4 book ai didi

iphone - 用户触摸 UIButton 次数过多 iPhone

转载 作者:行者123 更新时间:2023-12-03 20:07:51 24 4
gpt4 key购买 nike

如果用户不耐烦并在加载下一个 View 之前触摸此按钮,我会遇到嵌套 View 问题,为什么这不起作用?我以为将按钮 BOOL 启用为 no 可以解决此问题,但事实并非如此。

-(IBAction)start:(id)sender
{
startButton.enabled = NO;
[activity startAnimating];
[locationManager stopUpdatingLocation];
ViewController *view = [[ViewController alloc]init];
NSManagedObjectContext *context = [self managedObjectContext];
view.managedObjectContext = context;
[self.navigationController pushViewController:view animated:YES];
}

最佳答案

该 OP 代码应该可以工作。确保 startButton 是正确的按钮并已在 IB 中连接。

如果该操作是由您要禁用的按钮引起的,则 self.enabled = NO; 更直接。

关于iphone - 用户触摸 UIButton 次数过多 iPhone,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7930690/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com