[英]How to reload a button row in Eureka
我正在使用尤里卡表格。 我使用ButtonRow
使用Google Maps SDK為顯示地圖的View
打開一個View
。
我想,當關閉ButtonRow
時,我使用NSNotification通過地址來更新ButtonRow
的值。
我嘗試了.updateCell()
但是它不起作用。
這是我嘗試過的:
<<< ButtonRow("Where?") {
$0.title = $0.tag
print(address)
$0.value = address
$0.presentationMode = .SegueName(segueName: "GMViewController", completionCallback:{ vc in vc.dismissViewControllerAnimated(true, completion: nil) })
}
單擊該行之前,Address變量為空,但關閉時該變量將被填充。 我試過了
ButtonRow("Where?"){
$0.value = address
}.updateCell()
收到地址后,我確定地址變量已填滿。 但這仍然行不通。
有人遇到過這個嗎?
為您的行創建變量:
let buttonRow = ButtonRow() { /* setup */ }
像往常一樣添加到窗體<<< buttonRow
稍后更新:
buttonRow.value = new_value
buttonRow.updateCell()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.