LGSideMenuController icon indicating copy to clipboard operation
LGSideMenuController copied to clipboard

Animate sidebars to different view widths

Open simonsmiley64 opened this issue 9 years ago • 1 comments

Hello,

I want my users to be able to show different levels of information on the side bar. This means if they click a button the sidebar will open or close to a different level. Currently I am experimenting with pressing it manually:


@IBAction func state1ButtonPressed() {        
    sideMenuController?.leftViewWidth = 4.0
}
    
@IBAction func state2ButtonPressed() {
    sideMenuController?.leftViewWidth = 44.0
}

But this jolts the menu in and out. Is there a way of animating the side menus to different widths?

I have tried using an animateWithDuration block but this doesn't seem to fix it.

Any advice would be very appreciated,

Simon

simonsmiley64 avatar Jul 27 '17 04:07 simonsmiley64

Hi Simon,

I have a similar requirement and am experiencing the same problem. Did you ever find a resolution?

Thanks!

Pete

pjameson avatar Dec 18 '17 07:12 pjameson