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.
如何刷新视图控制器?即我有一系列动画运行到 viewdidload 并想再次重新加载 viewcontroller,真的会再次重新加载 viewdidload 吗?
这将是分配给 UIButton 的操作
谢谢
你应该这样做:
- (void)viewDidLoad { [self setUpInterface]; } //for UIButton Action - (IBAction)buttonTapped: (id)sender { [self setUpInterface]; } //for your aninmations - (void)setUpInterface { //your code for animation here }
不要尝试调用viewDidLoad,这不好。祝你好运!