0 Replies
      Latest reply on Aug 20, 2018 11:53 AM by Marl
      Marl Level 1 Level 1 (0 points)

        I've been programming 20 years and I don't think I've *ever* developed an app that didn't have at least 1 drop down box (not a menu).

        I'm shocked that Swift doesn't have a built in drop down box.

        Every other language I know except C has one that can hold both text, which is displayed and a value.

         

        I've got a tableview with custom tableviewcells.

        I'm using dynamic data.

        So far, so good.

         

        In the list of table view cells I've got a drop down box.

        ios DropDown: https://github.com/jriosdev/iOSDropDown

        I can get the drop down into each cell, with the correct data in its list

        BUT

        If, when it's running I click a drop down in the list, I can't see the list in the drop down.

        I presume this is because it's inside a view that's inside one cell so the rest of the dropped down list is outside the bounds of it's container view.


        This was the same kind of problem with HTML many years ago which has long since been resolved.

        We used to create a transparent layer and put the opaque dropdown into that.

        We' d just put that layer over top the table layer (a higher z index).

        It was a little cumbersome but it worked.

         

        So, I figure, I'll create a seperate storyboard 'DropDownStoryboard'.

        Then I set that storyboard's presentation to "Over Current Context"

        I give it a UIView big enough to hold the dropped down list and make it transparent (alpha = 0).

        Then I'll put the drop down on that view and make it opaque (alpha = 1).

        WRONGO!!! - I guess because the drop down is 'inside' the transparent container view, the drop down (even though opaque) is actually transparent too.

         

        Is there any way with Swift / XCode 9.4 that I can solve this problem?
        That is, is it possible to have drop down boxes inside (or over top) table view cells that are usable?