2010-06-09 73 views
0

此iPhone TableView中的單元格肯定具有詳細披露按鈕。如何獲得視圖是挖掘詳細信息披露按鈕

當我點擊它時......不應該使用此代碼訪問按鈕嗎?

相反,detailButton總是空。

- (void) tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath 
{ 
    UITableViewCell *aCell = [tableView cellForRowAtIndexPath:indexPath]; 
    UIButton *detailButton = (UIButton *)[aCell accessoryView]; 
} 

回答

0

你有沒有在'cellForRowAtIndexPath'中覆蓋單元格附件按鈕?

0

accessoryView僅供您自定義,可覆蓋accessoryType。表格視圖單元格將在內部處理您分配給accessoryType的任何內容,而不會影響accessoryView

相關問題