2014-09-06 2 views
0

저는 Swoft로 Xcode 6 빌드 7 코딩을 사용하여 iOS 7 및 iOS 8 용 앱을 개발하고 있습니다. 뷰 컨트롤러 중 하나에서 사용자 지정 셀이있는 tableview가 있는데, 사실, "true"로 편집하는 tableview 속성을 설정하면 아무 것도 나타나지 않고 삭제 단추가 표시되지 않지만 기본 셀을 사용하면 대신 내 작품.맞춤 UITableViewCell 편집 모드가 작동하지 않습니다.

내가 필요한 모든 방법

func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { 
    return true 
} 

func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { 
    if (editingStyle == UITableViewCellEditingStyle.Delete) { 
     // handle delete (by removing the data from your array and updating the tableview) 
    } 
} 

func tableView(tableView: UITableView, editingStyleForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCellEditingStyle { 
    return .Delete 
} 

을 사용했지만 아무것도 사람이 같은 문제가 있었다, 발생하지?

감사합니다.

답변

2

모든 해결책이 나 앞에서 항상 일어났습니다. 문제는 레이아웃에서 셀의 하위보기 방법 이었지만 일을하고 있었지만 슈퍼를 호출하는 것을 완전히 잊어 버렸습니다. 이 모든 것이 완벽하게 작동했습니다.

관련 문제