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.
如何对给定按钮内部的触摸等事件进行单元测试是否会调用特定的segue?我知道我可以直接调用 segue 并检查结果,但我想测试事件是否会执行 segue,换句话说,故事板中的链接是否正常。
我不知道这是否是您的疑问,但您可以检查这是否正确 segue
尝试这个:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"YOUR_SEGUE_NAME_HERE"]) { } }