iOS List Example

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
elanorb
Livecode Staff Member
Livecode Staff Member
Posts: 249
Joined: Fri Feb 24, 2006 9:45 am

iOS List Example

Post by elanorb » Thu Sep 19, 2013 12:35 pm

Hi Everyone

As requested here is a sample stack showing a basic iOS style list. This example uses the contacts from the SQLite Database.

If you open the script for the "Create list from db" button you will see that the list is created by setting some properties of the "contact list" group. The script for building the list is all contained in the "contact list" group script. If you extend the stack you will see the templates and the behavior button, which you can edit to meet your needs.

The properties you can set on the "contact list" group are

the sortItem - the item number you want the list to be sorted by
the itemSeparator - the itemDelimiter to be used
the uniqueItem - eg if each entry contains a unique id which you want to be stored but not shown state which item it is. The is set as the cUniqueID of each list item
the showInitial - true or false is alphabetical headers are to be shown
the listContents - the list to be displayed

You can update the behavior button with how you want each line to behave when clicked. The stack also creates a scroller to scroll over the list.

Please let me know if you have any questions.

Kind regards

Elanor
Attachments
contactListExample.zip
(27.01 KiB) Downloaded 121 times
Elanor Buchanan
Software Developer
LiveCode

Post Reply

Return to “Summer School 2013”