Joe-pan

Q: Sliders for iBook's widget built in iAd producer

I am attempting to build a widget that features sliders (general object) for iBooks in iAd producer. I added sliders in iAd Producer; have a minimum setting of 0.0, maximum of 10, and moving at increments of 0.5. I tested them in the preview funciton in iAd and the knobs on the sliders can be dragged up and down (at increments 0.5 becuase that is what I set it at), but when I export to a widget and drop it into an iBook and preview it, I lose the funciotnality of the knobs in the sliders. I can't drag the knobs back and forth anymore. Does anyone know why? Perhaps I missing an action...?

iPad, OS X Mavericks (10.9.2)

Posted on Mar 18, 2014 12:31 PM

Close

Q: Sliders for iBook's widget built in iAd producer

  • All replies
  • Helpful answers

  • by markmalone,

    markmalone markmalone Mar 18, 2014 12:48 PM in response to Joe-pan
    Level 2 (210 points)
    Mar 18, 2014 12:48 PM in response to Joe-pan

    Works for me. Have you hooked in any code that may be causing a problem?

     

    I dropped a slider and a label on a page then selected the slider and clicked the code button then selected to overrride the Did Change Value event handler and added the follwoing code:

     

    this.onControlValueChange = function (event) {

              // Code here for the "Did Change Value" event.

        var label = this.viewController.outlets.label;

        label.text = this.value;

       

    };

     

    I can slide the knob and the label updates as expected.  I did need to tap the widget before I could intereact with it in an iBook but otherwise it works the same for me in an iBook on the device as it does in preview.

     

    Any other clues?

     

    -Mark