点击IBAction ios表格单元格崩溃中的按钮

时间:2016-11-30 06:26:01

标签: ios swift uitableview uiviewcontroller

我在桌面视图单元格中有三个按钮,当点击按钮时,它会被奇怪地排在行中我附上代码和崩溃报告请提出解决方案。

按钮点击代码:

   @IBAction func ibaReject(sender: UIButton) {
    let notification = notifications[sender.tag]
    let notificationHandler = NotificationHandlerFactory.getNotificationHandler(notification)
    notificationHandler?.handleNegativeAction(notification,viewController: self)
}

崩溃的崩溃报告:

Crashed: com.apple.main-thread
    0  Quickride                      0x1000c589c specialized NotificationViewController.ibaReject(UIButton) -> () (NotificationViewController.swift)
1  Quickride                      0x1000c2d28 @objc NotificationViewController.ibaReject(UIButton) -> () (NotificationViewController.swift)
2  UIKit                          0x18d31e7b0 -[UIApplication sendAction:to:from:forEvent:] + 96
3  UIKit                          0x18d31e730 -[UIControl sendAction:to:forEvent:] + 80
4  UIKit                          0x18d308be4 -[UIControl _sendActionsForEvents:withEvent:] + 452
5  UIKit                          0x18d31e01c -[UIControl touchesEnded:withEvent:] + 584
6  UIKit                          0x18d31db44 -[UIWindow _sendTouchesForEvent:] + 2484
7  UIKit                          0x18d318d8c -[UIWindow sendEvent:] + 2988
8  UIKit                          0x18d2e9858 -[UIApplication sendEvent:] + 340
9  UIKit                          0x18dad6cb8 __dispatchPreprocessedEventFromEventQueue + 2736
10 UIKit                          0x18dad0720 __handleEventQueue + 784
11 CoreFoundation                 0x18744e278 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
12 CoreFoundation                 0x18744dbc0 __CFRunLoopDoSources0 + 524
13 CoreFoundation                 0x18744b7c0 __CFRunLoopRun + 804
14 CoreFoundation                 0x18737a048 CFRunLoopRunSpecific + 444
15 GraphicsServices               0x188dfd198 GSEventRunModal + 180
16 UIKit                          0x18d354628 -[UIApplication _run] + 684
17 UIKit                          0x18d34f360 UIApplicationMain + 208
18 Quickride                      0x1002d4018 main (AppDelegate.swift:23)
19 libdispatch.dylib              0x18635c5b8 (Missing)

0 个答案:

没有答案