开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜