Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableView has no scrolling

I have a UIViewController which uses the UITableViewDelegate and UITableViewDataSource. I have created UITableView with about 20 custom UITableViewCells and not all those UITableViewCells fit on the screen. Naturally you would think that it is possible to scroll to the bottom and see the other UITableViewCells but it doesn't detect the scrolling at all so I can't see the bottom items.

My AppDelegate has a UINavigationController and I just added it with

[window addSubview:navigationController.view]

The View Controller inside the Navigation Controller implements a

@interface MainViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>

All I am simply doing is creating a UINavigationController application so by default the UITableView properties should be the default ones.

My MainViewController XIB has

  • View
    • Table View
    • Table View Cell
    • Table View Cell
    • Table View Cell
    • another 15 Table View Cell

From the above I'm not sure how I've modified the default UITableView as I have not configured it in any way.

The UITableView renders as I want it to, but when I want to see the bottom UITableViewCells it just doesn't scroll at all.

like image 395
fes Avatar asked May 21 '11 01:05

fes


1 Answers

My checklist in this case:

  • is tableview scrollEnabled == YES?
  • tableView.contentSize.width != tableView.bounds.size.width && tableView.contentSize.height != tableView.bounds.size.height;
  • interface orientation is correct?
  • There aren't any invisibe UIView or subclass over the tableview.
like image 98
Roki Avatar answered Oct 21 '22 05:10

Roki