我试图与具有相似来源和不同目的地的segue合作。两个segue都连接了两个UIViewControllers。我想根据选择的任务按下按钮来调用它们。有这个按钮的代码。但是当我运行代码时,它会报告错误" SIGABRT"。标识符没有错误。
-(void) goTarget
{if (_spaseType==0) {
[self performSegueWithIdentifier:@"fromWelkomeToPlanemetry" sender:self];
}else{
[self performSegueWithIdentifier:@"fromWelcomeToStereometry" sender:self];
}}
堆栈跟踪
(
0 secondTry_GeometryHelper 0x000000010e8d705f -[DTStartVC goTarget] + 63
1 UIKit 0x000000010ebcca22 -[UIApplication sendAction:to:from:forEvent:] + 75
2 UIKit 0x000000010ecd3e50 -[UIControl _sendActionsForEvents:withEvent:] + 467
3 UIKit 0x000000010ecd2ddf -[UIControl touchesBegan:withEvent:] + 224
4 UIKit 0x000000010ec129ce -[UIWindow _sendTouchesForEvent:] + 325
5 UIKit 0x000000010ec13493 -[UIWindow sendEvent:] + 683
6 UIKit 0x000000010ebdffb1 -[UIApplication sendEvent:] + 246
7 UIKit 0x000000010ebed227 _UIApplicationHandleEventFromQueueEvent + 17700
8 UIKit 0x000000010ebc823c _UIApplicationHandleEventQueue + 2066
9 CoreFoundation 0x00000001105cfc91 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
10 CoreFoundation 0x00000001105c5b5d __CFRunLoopDoSources0 + 269
11 CoreFoundation 0x00000001105c5194 __CFRunLoopRun + 868
12 CoreFoundation 0x00000001105c4bc6 CFRunLoopRunSpecific + 470
13 GraphicsServices 0x0000000112ceaa58 GSEventRunModal + 161
14 UIKit 0x000000010ebcb580 UIApplicationMain + 1282
15 secondTry_GeometryHelper 0x000000010e8d19a3 main + 115
16 libdyld.dylib 0x0000000110ce5145 start + 1
17 ??? 0x0000000000000001 0x0 + 1
)