TableViewSection.remove example
Does anyone know how to remove开发者_如何学JAVA a row inside a TableView in Titanium.
To remove from a TableView you can use Ti.UI.TableView.deleteRow()
http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.TableView.deleteRow-method.html
To remove from a TableViewSection you can use Ti.UI.TableViewSection.remove()
http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.TableViewSection.remove-method.html
It's in the documentation, as Brian Huenefeld pointed out, but it's also in the Kitchen Sink app
https://github.com/appcelerator/KitchenSink/blob/master/Resources/examples/table_view_row_delete.js
In the future, please conduct a bit more due-diligence before asking questions
tableview.deleteRow(0);
don't pass the row object, it wont work instead pass the index and it would. The doc is completely mess there.
精彩评论