Передайте несколько параметров, чтобы AddTargetIOS

Программируем под IOS
Anonymous
Передайте несколько параметров, чтобы AddTarget

Сообщение Anonymous »

В моем uitableviewcell у меня есть кнопка. И я хочу добавить действие к нему, передавая несколько параметров в методе CellFororyAtIndexPath < /code>. < /P>

func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("CartCell", forIndexPath:
indexPath) as! CartTableViewCell
cell.buyButton.addTarget(self, action: self.buyButton(indexPath, 2, 3 ,4 , 5, 6), forControlEvents: .TouchUpInside)
}


Подробнее здесь: https://stackoverflow.com/questions/334 ... -addtarget

Вернуться в «IOS»