SSASideMenu is a reimplementation of romaonthego/RESideMenu in Swift. A iOS 7/8 style side menu with parallax effect.
###Usage
func application(_ application:UIApplication, didFinishLaunchingWithOptions launchOptions:[UIApplicationLaunchOptionsKey:Any]?)->Bool{
window =UIWindow(frame:UIScreen.main.bounds)
//MARK : Setup SSASideMenu
letsideMenu=SSASideMenu(contentViewController:UINavigationController(rootViewController:FirstViewController()), leftMenuViewController:LeftMenuViewController(), rightMenuViewController:RightMenuViewController())
sideMenu.backgroundImage =UIImage(named:"Background.jpg")
sideMenu.configure(SSASideMenu.MenuViewEffect(fade:true, scale:true, scaleBackground:false))
sideMenu.configure(SSASideMenu.ContentViewEffect(alpha:1.0, scale:0.7))
sideMenu.configure(SSASideMenu.ContentViewShadow(enabled:true, color:UIColor.black, opacity:0.6, radius:6.0))
sideMenu.delegate =self
window?.rootViewController = sideMenu
window?.makeKeyAndVisible()returntrue}###Installation As for now please clone the repository and drag the source folder into your project to use SSASideMenu. (Cocoapods & Carthage support coming soon) ###Customization
enumSSASideMenuPanDirection:Int{case edge =0case everyWhere =1}enumSSASideMenuType:Int{case scale =0case slip =1}enumSSAStatusBarStyle:Int{case hidden =0case black =1case light =2}structContentViewShadow{varenabled:Bool=truevarcolor:UIColor=UIColor.black
varoffset:CGSize=CGSize.zero
varopacity:Float=0.4varradius:Float=8.0}structMenuViewEffect{varfade:Bool=truevarscale:Bool=truevarscaleBackground:Bool=truevarparallaxEnabled:Bool=truevarbouncesHorizontally:Bool=truevarstatusBarStyle:SSAStatusBarStyle=.black
}structContentViewEffect{varalpha:Float=1.0varscale:Float=0.7varlandscapeOffsetX:Float=30varportraitOffsetX:Float=30varminParallaxContentRelativeValue:Float=-25.0varmaxParallaxContentRelativeValue:Float=25.0varinteractivePopGestureRecognizerEnabled:Bool=true}structSideMenuOptions{varanimationDuration:Float=0.35varpanGestureEnabled:Bool=truevarpanDirection:SSASideMenuPanDirection=.edge
vartype:SSASideMenuType=.scale
varpanMinimumOpenThreshold:UInt=60varmenuViewControllerTransformation:CGAffineTransform=CGAffineTransform.init(scaleX:1.5, y:1.5)varbackgroundTransformation:CGAffineTransform=CGAffineTransform.init(scaleX:1.7, y:1.7)varendAllEditing:Bool=false}
// MARK : Storyboard Support
@IBInspectablevarcontentViewStoryboardID:String?@IBInspectablevarleftMenuViewStoryboardID:String?@IBInspectablevarrightMenuViewStoryboardID:String?
// MARK : Private Properties: MenuView & BackgroundImageView
@IBInspectablevarfadeMenuView:Bool=true@IBInspectablevarscaleMenuView:Bool=true@IBInspectablevarscaleBackgroundImageView:Bool=true@IBInspectablevarparallaxEnabled:Bool=false@IBInspectablevarbouncesHorizontally:Bool=true
// MARK : Public Properties: MenuView
@IBInspectablevarstatusBarStyle:SSAStatusBarStyle=.black
// MARK : Private Properties: ContentView
@IBInspectablevarcontentViewScaleValue:Float=0.7@IBInspectablevarcontentViewFadeOutAlpha:Float=1.0@IBInspectablevarcontentViewInLandscapeOffsetCenterX:Float=30.0@IBInspectablevarcontentViewInPortraitOffsetCenterX:Float=30.0@IBInspectablevarparallaxContentMinimumRelativeValue:Float=-25.0@IBInspectablevarparallaxContentMaximumRelativeValue:Float=25.0
// MARK : Public Properties: ContentView
@IBInspectablevarinteractivePopGestureRecognizerEnabled:Bool=true@IBInspectablevarendAllEditing:Bool=false
// MARK : Private Properties: Shadow for ContentView
@IBInspectablevarcontentViewShadowEnabled:Bool=true@IBInspectablevarcontentViewShadowColor:UIColor=UIColor.black
@IBInspectablevarcontentViewShadowOffset:CGSize=CGSize.zero
@IBInspectablevarcontentViewShadowOpacity:Float=0.4@IBInspectablevarcontentViewShadowRadius:Float=8.0
// MARK : Public Properties: SideMenu
@IBInspectablevaranimationDuration:Float=0.35@IBInspectablevarpanGestureEnabled:Bool=true@IBInspectablevarpanDirection:SSASideMenuPanDirection=.edge
@IBInspectablevartype:SSASideMenuType=.scale
@IBInspectablevarpanMinimumOpenThreshold:UInt=60@IBInspectablevarmenuViewControllerTransformation:CGAffineTransform=CGAffineTransform(scaleX:1.5, y:1.5)@IBInspectablevarbackgroundTransformation:CGAffineTransform=CGAffineTransform(scaleX:1.7, y:1.7)
// MARK : Public Properties
weak vardelegate:SSASideMenuDelegate?varbackgroundImage:UIImage?varcontentViewController:UIViewController?varleftMenuViewController:UIViewController?varrightMenuViewController:UIViewController?###Author
Sebastian Andersen
romaonthego/RESideMenu was authored by Roman Efimov
###License
SSASideMenu is available under the MIT license. See the LICENSE file for more info.


