1
我使用具有可重用原型的動態單元格,並且始終在cellForRowAtIndexPath中設置單元格。更新cellForRowAtIndexPath之外的detailTextLabel?
對於其中一個單元格,我想多次更新詳細文本標籤(測試正在運行,並且我想在每個階段發生時更新用戶)。
這可能嗎?
我嘗試這樣做:
的detaillabel當前設置爲「狀態文本」的價值,這是空白開始。我的想法是使用委託,將字符串傳遞給它,然後重新加載tabledata,但這是行不通的。
目前我有:
代碼時,狀態變化:
[self currentStatus:@"Speed Test Initialized"];
currentStatus方法:
- (void) currentStatus:(NSString *)status {
[statusDelegate currentStatus:status];
statusText = status;
NSLog(@"Current status: %@", statusText);
[self.tableView reloadData];
}
現在狀態文本等於值我想要的細胞重新加載時更新,但事實並非如此。
任何提示?