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

Cannot apply simple animations to views having zero width on iOS

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: titanium 5.0.5
    • Fix Version/s: None
    • Component/s: iOS
    • Environment:

      Titanium SDK 3.5.0GA
      Alloy 1.5.1
      iPhone Simulator (iOS SDK 8.1)

      Description

      Trying to apply simple animation to a view in order to modify its size (open/close effect), the animation could not be appliedon iOS devices when the view's width is zero. The same example is working perfectly on Android.

      How to reproduce on a simple example:

      index.xml

      <Alloy>
      	<Window class="container" layout="vertical" height="100%" width="100%">
      		<View height="20%" width="Ti.UI.FILL" layout="horizontal">
      			<Button onClick="close" title="close"></Button>
      			<Button onClick="open" title="open"></Button>
      		</View>
      		<View height="80%" width="Ti.UI.FILL" layout="horizontal">
      			<View id="left" width="50%" backgroundColor="red"></View>
      			<View id="right" width="50%" ></View>
      		</View>
      		
      	</Window>
      </Alloy>
      

      index.js

      function open(e) {
          var anim = Ti.UI.createAnimation({
      		width : "50%",
      		duration : 2000,
      		curve : Ti.UI.ANIMATION_CURVE_EASE_IN_OUT
      	});
      	$.left.animate(anim);
      }
      function close(e) {
          var anim = Ti.UI.createAnimation({
      		width : "0%",
      		duration : 2000,
      		curve : Ti.UI.ANIMATION_CURVE_EASE_IN_OUT
      	});
      	$.left.animate(anim);
      }
       
      $.index.open();
      

      when the width is set to 1% in the close animation, the open animation is working properly but when set to 0% it's impossible to reopen the view.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              selim.ghdiri@gmail.com Selim Ghdiri
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration