0

I've been looking all over for the answer to this to no avail. When scrolling a TableView in a Titanium iPhone app, the TableView bounces when you've scrolled past it's top or bottom. It's supposed to be some kind of built in "Pull to refresh" functionality. How do I shut this off? Here is the answer for iPhone: Disable UITableView vertical bounces when scrolling

I don't know how to get this to work in a Titanium app. Thanks in advance.

Community
  • 1
  • 1
vbullinger
  • 4,016
  • 3
  • 27
  • 32

1 Answers1

2

I would rethink your desire to do this. It is not part of the pull-to-refresh, but is that natural table view behavior that iOS users have learned to expect over the past 6 years. Disabling it will feel very unnatural to your users and will stand out as a UI imperfection in your app.

If you have access to the table view object and can write arbitrary code (sorry, I am unfamiliar with how Titanium works), the API for this is to set tableView.bounces = NO;

coneybeare
  • 33,113
  • 21
  • 131
  • 183
  • Thanks. I'll relay the concern. – vbullinger Dec 17 '13 at 22:03
  • Here's the object's documentation in Titanium: http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.UI.TableViewRow You'll see in the properties that there is no "bounces" property. Some other objects have a "disableBounce" property, but TableView does not :( Also, `NO` would not be logical in JavaScript. It could be a boolean `false` or it could be the string `'no'` or `'NO'` or some constant like `Ti.UI.iOS.NO` In fact, I might just try those options for fun. JavaScript is cool like that. – vbullinger Dec 18 '13 at 14:36
  • The syntax I wrote was objective-c, also those links you have are for the tableviewrow, not the tableview. But don't get your hopes up, the tableview doesnt have anything (documented) either – coneybeare Dec 18 '13 at 15:13