Forum Discussion

Janis's avatar
Janis
Occasional Contributor
8 years ago
Solved

iOS dropdown menu

hi all!   There is a dropdown menu in our application. It contains 27 menu items, but only 5 are visible on the screen simultaneously. Is it possible to have all items to select any of them without...
  • baxatob's avatar
    baxatob
    8 years ago

    Janis you can use ScrollToItem method instead of swiping. E.g. you have a menu item "Item_10" which is in the TableViewCell(0, 10). Use:

     

    TableView.ScrollToItem(0, 10)

    You can make a function to scroll through all items while searching for required element. Something like this:

     

    function selectFromDropdown(item) {
    
        index = 0;
        while (! item.Visible) {
    
            TableView.ScrollToItem(0, index);
            index ++;
            }
        item.Touch();
        }