簡體   English   中英

iPad應用程序UITableView委托方法沒有被調用

[英]iPad application UITableView delegate methods are not getting called

我正在使用與我在編寫iPad應用程序時在iphone中填充UITableView相同的技術。 標簽欄控制器> UINavigationController>類型為myCustomTable的UITableViewController(從NIB加載)

MyCustomTableViewController NIB和類文件實現委托方法

@interface MyCustomTableViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> {

 NSMutableArray *PDFList;
 IBOutlet UITableView *PDFTable;

}

但我的委托方法沒有被調用。 我該怎么辦?

找到解決方案....

在tableView委托方法中 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView

我返回0,因此沒有調用任何委托方法。

您是否在IB中設置了表的委托和數據源? 如果你有,並且一切都已接通,它應該可以工作。

FWIW - 這是我與筆尖最大的問題。 如果遇到問題,那么向非本地人尋求幫助要困難得多。

確保在Interface Builder中的Identity Inspector(工具 - > Identity Inspector)中正確設置了“類”。 還要在Interface Builder中設置相應的“引用插座”。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM