viezel/NappDrawer

iOS — Open Drawer Animation Bug (v2.0.0) 🐛

Opened this issue · 6 comments

When opening a drawer with toggleLeftWindow() or via pan gesture cancel (line 1059), the animation does not begin (or complete) until the drawer has finished opening (1.0/100%). See attached screencast) 📽️ (using ANIMATION_SLIDE).

Note(s):
· Tested with left drawer only
· Animation methods which do not require the centerWindow to 'pull' the drawer window (ex. ANIMATION_FADE or ANIMATION_NONE) seem to work fine
· Seems to affect opening of the drawer only (closing works as expected)
· Maybe CATransform3DMakeTranslation?

Side Note:
· The thin black vertical line shown in the screencast can be fixed by removing this line or possibly by setting [self.view setBackgroundColor:[UIColor blackColor]]; to [self.view setBackgroundColor:[UIColor clearColor]];
— Most prominent when using ANIMATION_SLIDE & a light theme (background color) on leftDrawer and centerWindow

Environment:
· dk.napp.drawer: 2.0.0
· TiSDK: 7.1.0.v20180108165029 (app relies on: https://jira.appcelerator.org/browse/TIMOB-24404)
· Alloy: 1.10.7
· Hyperloop: 3.0.1
· iOS: 10.3 & 11.2
· Device(s): iPhone 6s (10.3.3) & iPhone X (11.2.2)
· Simulator: iPhone X (11.2)

Just upgraded from V1.2.4, which worked fine for me using ANIMATION_PARALLAX_FACTOR_7, to V2.0.0 and have the same issue with the black vertical line.

What's up, @MarkBoyer? — you can fix the vertical black line issue as suggested in the Side Note of the comment above (preferred method) or try setting Ti's default backgroundColor to something like the below (in alloy.js):
Ti.UI.setBackgroundColor('rgba(255,255,255,1)');
Note: the above line works well when using a light (white) background in your drawer (left/center/right) windows

Hopefully this helps until a better solution (or fix) is made to the sub module MMDrawerController 🙂

Thanks for the quick reply @designbymind. I made the change to the module that you suggest and rebuilt it and while the block vertical stripe is gone, it's still not visually pleasing IMHO. There seems to be a bigger issue with the slide. Unfortunately, the native stuff is not my strong suit. I just changed to using the "ANIMATION_FADE" animation mode and is looks much better to me. Perhaps someone with more native experience can fix this.

@MarkBoyer — Right on. Something was definitely broken in v.2.0.0 in regards to any animation that 'pulls' the drawer. The only two animation modes that I've noted to work as expected are: ANIMATION_NONE & ANIMATION_FADE as they don't require the drawer (left or right) to 'slide' (move along an x-axis).
Moving forward: there were quite a few additions/source formatting in v.2.0.0, However, I cannot currently allocate the time to look into a fix for the animation issues. For now, I'm sticking with v.1.2.4 which is stable and I myself am currently using it in both development & production iOS apps 📱

Same problem with "ANIMATION_SLIDE_SCALE" (V 2.0.0). Opening the drawer results in a blank view while animating and - after animation has been ended - the view is shown.

Any update on this? Can anyone offer a starting point on how to fix this?