How can I add a multi-line label in my tableview like the one in this screen (the label below multitasking gestures):
http://cl.ly/6g0B
How can I add a multi-line label in my tableview like the one in
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to make your tableview grouped (when targetting an iOS device, at least). Then, you create a table view section to contain your rows, and your multi-line label is added to the section through its headerView property.
Check out the documentation for the TableViewSection view here: http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.TableViewSection-object
A brief example – it’s untested sorry, I don’t have a Mac around at the moment, but the principle is sound. You create a your header view, create a section, set the section header view, add some cells to the section, and give your table an array of sections:
The important thing to note is that you only need a single table – in the example you gave, rows are instead grouped into sections, some of which have headers.