Releases: AndriyGo/DrawerController
Bitcode enabled
Swift 5
iOS 11 support
3.2.4 iOS 11 support
Animatable is now fully off
3.2.3 Fully turning off animatable
Turn animatable off by default
3.2.2 Animatable turned off by default
Ability to change strokeColor on the go
Ability to adjust strokeColor on the go If an app wants to support multiple interface colours it is difficult ti switch the color of the DrawerBarButtonitem. Current commit adds this ability for non-animated buttons. In addition, it fixes a bug due to which when animatable is set to false both layers and drawRect could be called
DrawerBarButtonItem redesign
Style update
Default implementation of DrawerBarButtonItem was of iOS 6 style. It is way outdated!
Current commit changes the design to be of iOS 7+ style. The size is reduced from 30 to 26 pixels (within the recommended boundary). The lines are drawn without rounded caps.
Support for disabling animations
By default, AnimatedMenuButton supports animations and uses CAShapeLayer to draw lines.
The problem is that in the majority of cases animations are not needed + CAShapeLayer has weird antialiasing. I tried to turn it off and didn't manage to do so.
This commit therefore introduces the possibility to instantiate AnimatedMenuButton without animations. In this case, CAShapeLayers are not used and instead all lines are drawn within the drawRect method.
In order to support this behaviour DrawerBarButtonItem exposes a new convenience initialiser: init(target: AnyObject?, action: Selector, menuIconColor: UIColor, animatable:Bool). By default, old behaviour is preserved (i.e. button is animatable).
However, users can now choose to opt out from this behaviour. Another benefit is that straight lines on iPhone 7+ are drawn with anti aliasing if CAShapeLayers are used. If, however, they are not used, the lines are solid color 3px.
Prevents double reassignment of view controller
Assigning view controllers in the decodeRestorableState method is only needed if the user did not set them already.
Exposure of minimumAnimationDuration property
By default, minimum animation duration is set to 0.15. This is too low for many applications. Current commit lets users controller the minimumAnimationDuration. By default, it is set to 0.15 which means that without extra changes original behaviour will be preserved.