2015-01-15 2 views
-1

내가 정말 큰 문제가 :스위프트 PrepareForSegue 오류 스레드 1 : EXC_BREAKPOINT (코드 = EXC_ARM_BREAKPOINT, 서브 코드 = 난 내 PrepareForSegue 기능을 컴파일 할 때 0xdefe

오류는 "함정에 스레드 섹션에서 열립니다
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) { 
    if segue.identifier == "findMap" { 
     let MapViewController = segue.destinationViewController as UIViewController 
     if sender as UITableView == self.searchDisplayController!.searchResultsTableView { 
      let indexPath = self.searchDisplayController!.searchResultsTableView.indexPathForSelectedRow()! 
      let destinationTitle = filteredDepartments[indexPath.row].name 
      MapViewController.title = destinationTitle 
     } else { 
      let indexPath = self.tableView.indexPathForSelectedRow()! 
      let destinationTitle = departments[indexPath.row].name 
      MapViewController.title = destinationTitle 
     } 
    } 
} 

"-row :

-> 0x2f6e18 : 트랩

에러 코드는 위와이다

-> 스레드 1 EXC_BREAKPOINT (코드 = EXC_ARM_BREAKPOINT, SU

답변

0

무엇을 얘기하기 어렵다 ...

if sender as UITableView == self.searchDisplayController!.searchResultsTableView { 

가시 난 그래서 저를 도와주세요, 그것을 해결하는 방법을 모른다 : bcode =

0xdefe 나는 오류가이 라인에 생각 코드는 뜻,하지만 내 생각 엔 당신이 의미하는 것이 있습니다 :

if sender === self.searchDisplayController!.searchResultsTableView { 

공지 사항 운영자 트리플 동일의 사용이 의미하는 "와 같은 개체입니다."

+0

내 새로운 Swift 튜토리얼을 참조하십시오. http://www.apeth.com/swiftBook/ch04.html#_object_identity – matt

관련 문제