iOSCustomTableCell and pushTo(newView)

  1. 5 months ago

    Rob H

    is not verified Feb 13 Pre-Release Testers, Xojo Pro Haaksbergen, the Netherlands

    I am developing with an iOS app with questionnaires. To show the questionnaires I use an iOStable. A question is shown with an iOSCustomTableCell. That works without problems.
    Now there is the wish to be able to add a photo to a single question. Startpoint is an iOSCustomTableCell to open a newView and the IosPicturePicker on it.

    I would prefer to use Pushto (newView), but that method is not available in an iOSCustomTableCell.

    With app.CurrentScreen.Content = newView I can open the newView, but I have lost the link to the iOSCustomTableCell.

    How can I solve this? Or is it not possible?

    Hi,

    Using TableDataSource is the way to go, but you also need to implement a delegate so that it is the containing view that calls the self.Pushto and not the CustomCell.

    In the first link from my previous post, you will find a working example.

  2. Jeremie L

    Feb 13 Pre-Release Testers, XDC Speakers Europe (France)

    The easiest way to achieve this is to use a Delegate/Callback mechanism.

    https://forum.xojo.com/45866-return-value-from-modalview (has an example project)
    https://forum.xojo.com/45084-ios-customtablecell-list-issues

  3. Rob H

    is not verified Feb 19 Pre-Release Testers, Xojo Pro Haaksbergen, the Netherlands

    I have tried 2 days to get it working, but I can not figure it out.

    I want to place a button in an iOSCustomTableCell to add a photo. I have tried an iOSView and ModalView, but without success.

    It goes wrong with the call: self.PushTo (v). self points to (of course) the iOSCustomTableCell and not to the iOSView.
    But How can I solve that?

    I used iOS example project TableDataSourceDatabase as a test. Link to application

  4. Jeremie L

    Feb 19 Pre-Release Testers, XDC Speakers Answer Europe (France)

    Hi,

    Using TableDataSource is the way to go, but you also need to implement a delegate so that it is the containing view that calls the self.Pushto and not the CustomCell.

    In the first link from my previous post, you will find a working example.

  5. Rob H

    is not verified Feb 19 Pre-Release Testers, Xojo Pro Haaksbergen, the Netherlands

    Thanks @Jérémie Leroy! The TableDataSource, that was the trick. It is working now.

or Sign Up to reply!