Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25459

iOS: toImage method needs parity with Android & Windows

    Details

      Description

      When use toImage method on View we have a discrepance between iOS and the Android / Windows callback parameter

      Sample:
      index.js

      $.addListener($.index, 'postlayout', function (e) {
        $.box.toImage(function (e) {
              if (OS_IOS) {
                  //e is a Event object who has a blob key: e.blob
                  $.img.setImage(e.blob);
              } else if (OS_ANDROID || OS_WINDOWS) {
                  //e is a Ti.Blob instead a Event object
                  //e.blob -> undefined
                  $.img.setImage(e);
              }
        });
      });
       
      $.index.open();
      

      index.xml

      <Alloy>
        <Window layout="vertical" backgroundColor="white">
          <View id="box" width="Ti.UI.SIZE" height="Ti.UI.SIZE" backgroundColor="pink" layout="vertical" top="25">
            <Label id="sample" text="This is my label" color="red"/>
            <ImageView image="/images/some_sample_image.jpg"/>
          </View>
          <ImageView id="img"/>
        </Window>
      </Alloy>
      

        Attachments

          Activity

            People

            • Assignee:
              hknoechel Hans Knöchel
              Reporter:
              jormagar Jorge Macias Garcia
              Reviewer:
              Vijay Singh
              Tester:
              Abir Mukherjee
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-5929
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code