如何将按钮的文本更改为变量?

时间:2017-04-11 16:05:44

标签: ios swift uibutton

let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: <#T##IndexPath#>) as! TableViewCell
    cell.myButton. =  recipies[indexPath.row]
}

我不知道在cell.mybutton.之后要添加什么。

此代码的顶部在Xcode中也标记为不正确

1 个答案:

答案 0 :(得分:0)

美观而简单

cell.myButton.setTitle(recipies[indexPath.row], for: UIControlState.normal)