fourthnovember
fourthnovember

Reputation: 27

AMSlideMenu deepness effect for the menus

im working with AMSlideMenu, and i did in the MainVC

// Enabling Deepnes on left menu
- (BOOL)deepnessForLeftMenu
{
    return YES;
}

// Enabling Deepnes on right menu
- (BOOL)deepnessForRightMenu
{
    return YES;
}

Normally a deepness effect will be in the left and right menu, but nothing happen .

Did anyone tried AMSlideMenu before and had same pb ?

Upvotes: 0

Views: 93

Answers (1)

Mehul Patel
Mehul Patel

Reputation: 23053

Yes it is working. You just need to observe it. If -deepnessForLeftMenu is enabled you can see that menu will be transform and it shows animation and scaling of left menu.

Put a debugger check in AMSlideMenuMainViewController.m class for below method and you will see the differences.

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];

// Put a break point here.
    if (self.leftMenu && [self deepnessForLeftMenu])
    {
        self.leftMenu.view.layer.transform = kMenuTransformScale;
        self.leftMenu.view.layer.opacity = kMenuLayerInitialOpacity;
    }
    if (self.rightMenu && [self deepnessForRightMenu])
    {
        self.rightMenu.view.layer.transform = kMenuTransformScale;
        self.rightMenu.view.layer.opacity = kMenuLayerInitialOpacity;
    }

}

Also the deepnessForLeftMenu bool variable used in other two methods for the same class

- (void)configure3DTransformForMenu:(AMSlideMenu)menu panningView:(UIView *)panningView
{
    float cx = 0;
    float cy = 0;
    float cz = 0;
    float opacity = 0;

    // Put a break point here.

    /********************************************* DEEPNESS EFFECT *******************************************************/
    if (menu == AMSlideMenuLeft && panningView.frame.origin.x != 0 && [self deepnessForLeftMenu])
        {
             // Codes for deepness effect
        }
}

If you set NO for deepnessForLeftMenu variable. You will able to see that menu will show flat animation.

Upvotes: 1

Related Questions