Tôi mới đến nhanh và không được lập trình trong mục tiêu C. Vì vậy, tôi mới :-) cố gắng làm điều gì đó khá đơn giản. Link a cell xem bảng nhấp để gọi một phương pháp trong điều khiển như vậy http://prntscr.com/4m9kf7Swift Cố gắng liên kết sự kiện nhấn trên ô xem bảng với phương thức điều khiển
Edit:
tôi có những phương pháp trong MasterController tôi
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
override func tableView(tableView: UITableView!, didSelectRowAtIndexPath indexPath: NSIndexPath!) {
Tôi đã thêm breakpoint trong tất cả 4 trong số họ . và khi nhấp vào ô, nó không dừng lại ở một trong số chúng. Xem Screen shot:
nó trong ảnh chụp màn hình, cố gắng kết nối phương pháp này thông qua kết nối trợ lý – WebQube
Bạn cần phải thực hiện các phương pháp đại biểu đường didSelectRowAtIndex và đặt mã xử lý của bạn bên trong phương pháp đó . – Woodstock