所以,這是我的看法:的UITableView不會滾動
,這是我的UITableViewDelegate和DataSource
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 20;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"course"];
cell.textLabel.text = [NSString stringWithFormat:@"%i" ,arc4random() % 10];
cell.detailTextLabel.text = [NSString stringWithFormat:@"%i" ,arc4random() % 10];
return cell;
}
這是結果:
問題是,UItableView不滾動。決不。我真的不知道爲什麼... 有人可以幫助我嗎?
您在結果中顯示的標題圖像(時鐘),您如何實現該功能?它覆蓋了桌面視圖嗎? – mkral
我以編程方式實現,不,它不覆蓋tableView。 –
那麼如果你確定你編寫的頭文件UIView的框架沒有比預期的大,並且覆蓋了tableview,那麼肯定還有別的東西在進行。你有沒有做過任何改變,你認爲可能是問題? tableview是scrollview的一個子類,所以它應該可以工作。 – mkral