Interested in a hands-on tutorial in Titanium? Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services
While creating the layout for our Mobile App project, there was one Window where the TableViewRows should have a border at the bottom. I thought the separatorColor property would solve it but this was the result in iOS7 simulator:
As you can see, there’s a gap on the left side of the Window and the fix for this “bug” on Titanium will be released on December 9 2013, well our project cannot wait for a long time. I saw some hacks from other websites like adding a View inside the TableViewRow, etc.., but none of them really work for me. So I tried to hack it on my own and I managed to solve our problem by inserting a TableViewRow with a different property.
Now this is the result we had:
The height of the TableViewRow you’ll be inserting should be 1dp and change the backgroundColor to the color you need.
Our TableViewRows and the other elements in our project are added dynamically.
Here’s how we did it:
You can’t add a TableViewRow in a TableView, so you should first create an Array
e.g var rowArray = ; then push the TableViewRow inside the array e.g
rowArray.push(newTableViewRowName); and finally set the TableView data to the rowArray
Hope this will help you in some way.