gpt4 book ai didi

ios - Segue 不工作(不再)?

转载 作者:行者123 更新时间:2023-11-29 02:20:02 25 4
gpt4 key购买 nike

我对 segues 了解不多,但我已经开始工作了..但突然间它不再工作了......

我的代码似乎可以工作,但没有发生 segue:

NSLog(@"login started");
if ([user_temp]) {
NSLog(@"login success!");
[self performSegueWithIdentifier:@"loginsuccess"];
}

控制台输出:

2015-01-31 21:35:27.321 Vertretungsplan[6753:3122243] login started
2015-01-31 21:35:27.321 Vertretungsplan[6753:3122243] login success!

但是 segue 没有出现? (这只是一个片段,我减少了代码......)

enter image description here

最佳答案

确保以下事项

  1. 标识符有效。
  2. 您正在主线程上执行 segue。
    [self performSelectorOnMainThread:@selector(performSegueWithIdentifier:sender:) withObject:@"loginsuccess" waitUntilDone:NO];

关于ios - Segue 不工作(不再)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28256309/

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