PDA

View Full Version : UITableViewController not scrolling with momentum




tonyw
May 28, 2009, 03:29 PM
hi!

What i have is a UIView, added to the window, and a UITableViewController object which initializes its cells in the expected manner.

I add the UITableViewController object to the view like this -

[self addSubview:[UITableViewControllerObject view]];

I find the table is draggable, but doesn't have the nice whizzy momentum thing that every other table view ap has. I guess I'm missing some subtlety, or doing it totally wrong :)

This is all done in code, no nib file. The view is totally plain bar the table view object - no nav bar or anything else.

any thoughts?

tony



BlackWolf
May 28, 2009, 03:33 PM
I think what you want is
http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIScrollView_Class/Reference/UIScrollView.html#//apple_ref/occ/instp/UIScrollView/bounces

but actually the default of that values is YES, so it should work without you doing something. or do you mean something else?

edit: do you mean that you can flick the table? that should always be possible, though it might not be that easy in the simulator. did you test in on an actual device?

tonyw
May 28, 2009, 04:47 PM
hi BlackWolf, thanks for the reply.

I do mean the bounces thing, yes. But it makes no difference - and it actually locks up on the device, so I guess I'm really wrong somewhere :)

Hmmm!