[BUG] Scale9Sprite as stencil in ClippingNode

I am using a Scale9Sprite as stencil in a clipping node. The code is given below:

   var scale9Stencil = new cc.Scale9Sprite(res.Panel_png);
    scale9Stencil.setContentSize(cc.winSize.width * 0.8, cc.winSize.height * 0.6);

    var clippingNode = new cc.ClippingNode(scale9Stencil);
    clippingNode.setAlphaThreshold(0.99);
    clippingNode.setPosition(cc.winSize.width * 0.5, cc.winSize.height * 0.5);
    this.addChild(clippingNode, - 8);

    var spriteRay = new cc.Sprite(res.Ray_png);
    spriteRay.setScale(cc.winSize.height / spriteRay.height * 2);
    spriteRay.setPosition(0, 0);
    spriteRay.setOpacity(100);
    clippingNode.addChild(spriteRay, 2);

This code is working as intended in browsers. However, on iOS the “setAlphaThreshold” is not working and the stencil is acting like a rectangle. So I am not getting desired clipping effect of rounded corners.

Is there any workaround to this? I found a similar problem on cocos2d-x c++ section but no solution was posted there.

@SonarSystems @pandamicro @almax27

Check this link out https://github.com/cocos2d/cocos2d-x/issues/9977

@SonarSystems I visited this page before. My issue is similar to the last post on that page.

In my case, AlphaThreshhold did not seem to work (Im on cocos2djs 3.5. I
 wanted to clip my image with "rounded corner" Scale9Sprite, but it was 
clipped as a simple rectangle.

Basically the same symptom as his.. 

http://www.cocoachina.com/bbs/read.php?tid-281608.html

There is no solution specific to javascript here.