【发布时间】:2023-03-31 16:55:01
【问题描述】:
我想显示一个按钮,然后我想显示 1 秒钟,然后视图控制器必须更改。 我已经尽力了。但是我把 sleep(1) 放在哪里并不重要; - 它总是做同样的事情。它等待 1 秒,然后在非常短的时间内显示按钮并切换到另一个视图控制器。
谁能帮忙?
我的代码:
[self.resultButton setTitle:category forState:UIControlStateNormal];
self.resultButton.hidden = NO;
sleep(1);
UIViewController *vc = [[UIViewController alloc] init];
vc = [self.storyboard instantiateViewControllerWithIdentifier:@"mapViewControllerID"];
[self presentModalViewController:vc animated:YES];
【问题讨论】:
-
当你清楚地使用objective-c时,为什么这会被标记为
swift?
标签: ios swift hidden viewcontroller break