2016-11-30 30 views
0

的參數rawValue說法,我有以下碼4,其曾在斯威夫特2,但是,代碼升級到斯威夫特3不起作用/的Xcode 8.2斯威夫特3 UITableViewAction錯誤遺失呼叫

錯誤:Missing argument for parameter rawValue in call

這裏是我的問題代碼。錯誤在第2行觸發。

func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? { 
    return [UITableViewRowAction(style: UITableViewRowActionStyle(), title: "Remove", handler: { (_, _) -> Void in 
    //  return [UITableViewRowAction(style: UITableViewRowActionStyle(), title: "Remove", handler: { (_, _) -> Void in 
     self.tableView(self.shoppingCartTableView, commit: .delete, forRowAt: indexPath) 
    })] 
} 
+0

首先谷歌命中 「UITableViewRowAction迅速3」 :) –

回答

2

UITableViewRowActionStyle是枚舉。下面

代碼應工作:

UITableViewRowActionStyle.default 

或只是

.default