{"id":2648,"url":"https://github.com/fahidattique55/FAPanels","last_synced_at":"2025-08-03T00:32:11.840Z","repository":{"id":56910236,"uuid":"97647309","full_name":"fahidattique55/FAPanels","owner":"fahidattique55","description":"FAPanels - Swift","archived":false,"fork":false,"pushed_at":"2019-12-09T01:24:08.000Z","size":728,"stargazers_count":851,"open_issues_count":19,"forks_count":90,"subscribers_count":26,"default_branch":"master","last_synced_at":"2024-10-30T03:15:01.556Z","etag":null,"topics":["animation","animations","fahad","fapanels","interface-rotation","leftmenu","menu","panels","rightmove-files","sidemenu","sidemenucontroller","sidemenuswift","statusbar","swift","swift5","transit","xcode","xcode10"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fahidattique55.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-18T21:54:54.000Z","updated_at":"2024-07-11T15:56:58.000Z","dependencies_parsed_at":"2022-08-20T19:40:07.676Z","dependency_job_id":null,"html_url":"https://github.com/fahidattique55/FAPanels","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fahidattique55%2FFAPanels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fahidattique55%2FFAPanels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fahidattique55%2FFAPanels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fahidattique55%2FFAPanels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fahidattique55","download_url":"https://codeload.github.com/fahidattique55/FAPanels/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228510747,"owners_count":17931760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","animations","fahad","fapanels","interface-rotation","leftmenu","menu","panels","rightmove-files","sidemenu","sidemenucontroller","sidemenuswift","statusbar","swift","swift5","transit","xcode","xcode10"],"created_at":"2024-01-05T20:16:19.204Z","updated_at":"2024-12-06T18:30:38.456Z","avatar_url":"https://github.com/fahidattique55.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Menu","Other free courses"],"readme":"![Alt text](http://i.imgur.com/i0G92dq.png \"FAPanel-Image\")\n\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"http://i.imgur.com/ZN13eaf.gif\"\u003e\n        \u003cimg src=\"http://i.imgur.com/ZN13eaf.gif\" height=\"450\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n\n[![Swift version](https://img.shields.io/badge/swift-5.0-orange.svg?style=flat.svg)](https://img.shields.io/badge/swift-5.0-orange.svg?style=flat.svg)\n[![Support Dependecy Manager](https://img.shields.io/badge/support-CocoaPods-red.svg?style=flat.svg)](https://img.shields.io/badge/support-CocoaPods-red.svg?style=flat.svg)\n[![Version](https://img.shields.io/cocoapods/v/FAPanels.svg?style=flat)](http://cocoapods.org/pods/FAPanels)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![License](https://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat.svg)](https://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat.svg)\n[![Platform](https://img.shields.io/cocoapods/p/FAPanels.svg?style=flat)](http://cocoapods.org/pods/FAPanels)\n[![CocoaPods](https://img.shields.io/cocoapods/dt/FAPanels.svg)](http://cocoapods.org/pods/FAPanels)\n[![CocoaPods](https://img.shields.io/cocoapods/at/FAPanels.svg)](http://cocoapods.org/pods/FAPanels)\n\n\n\n## Famous Apps Using FAPanels\n---\n\n- FanTazTech (https://itunes.apple.com/us/app/fantaztech/id1334853147?mt=8)\n- FTT Tech (https://itunes.apple.com/us/app/ftt-tech/id1376054178?mt=8)\n- SoleLinks (https://itunes.apple.com/us/app/sole-links/id1434352524?mt=8)\n- LOGX (https://itunes.apple.com/us/app/l-o-g-x/id1398600417?mt=8\u0026ign-mpt=uo%3D4)\n- RepairDesk (https://itunes.apple.com/pk/app/repairdesk-pos-register/id1246495656?mt=8)\n- ScanShake Visitor (https://itunes.apple.com/us/app/scanshake-visitor/id1349888987?mt=8)\n- ScanShake Exhibitor (https://itunes.apple.com/us/app/scanshake-exhibitor/id1349889664?mt=8)\n\n\n## New Features Added\n---\n\n- [x] Swift Package Manager Support Added\n\n\n\n\n## Change Color Of Center Panel While Panning\n---\n\n```swift\nopen var colorForTapView: UIColor = UIColor.black.withAlphaComponent(0.35)\nopen var shouldAnimateWithPan: Bool = true\n```\n\n\n## Issues Resolved ( \u003e 0.5.0 only)\n---\n\n- [x] XCode 10 support \n- [x] Swift 5.0 support\n\n\n\n## Issues Resolved ( \u003e 0.4.0 only)\n---\n\n- [x] Presenting a UINavigation controller distorts the frames of center panel while left panel is open and its state is front, is resolved \n- [x] Crash when right panel is nil and layout panel containers are updated is resolved\n\n\n\n\n\n## New Features Added ( \u003e 0.3.5 only)\n---\n\n- [x] Execute a completion closure for any state of side menus, right after the animation of changing center panelVC\n- [x] Smooth logout feature ( i.e: When user taps on logout button/cell in the side menu, you will change the center panelVC and then can set left panelVC  to \"nil\" as you don't want the user to use side menus in login/signup stories)\n- [x] Change Left/Right menus with smooth center panelVC animations\n\n\n\n\n## New Features Added ( \u003e 0.3.1 only)\n---\n\n- [x] Create as many instances of FAPanelController with code only\n- [x] Configure its left, right and center panels as you want\n- [x] Update the Root Window Controller with any FAPanelController object\n\n\n### Usage\n\n```swift\n\n//  Create FAPanelController object with out any NSCoder, Storyboards and Nib files\n\nlet rootController = FAPanelController()\n\n//  Configure the panels as you want and assign this panel controller to root controller of window.\n\nwindow?.rootViewController = rootController\n\n\n//  You can also set window's root controller to any FAPanelController object with different FAPanelConfigurations at any time.\n\n```\n\n\n\n\n## New Features Added ( \u003e 0.3.0 only)\n---\n\n- [x] Right panel position (front/back) to center panel\n- [x] Dark Overlay on right panel, if right panel position is front\n\n\n### Right Panel Position\n\n| back | front |\n| --- | --- |\n| ![](https://i.imgur.com/KgLKynq.gif) |  ![](https://i.imgur.com/T9A51yi.gif)\n\n\n### Usage\n\n\n\n```swift\n\n//  Set the Right Panel position\n\nlet rootController: FAPanelController = window?.rootViewController as! FAPanelController\n\nrootController.rightPanelPosition = .front\nrootController.rightPanelPosition = .back\n\n\n```\n\n\n\n## New Features Added ( \u003e 0.2.1 only)\n---\n\n- [x] Left panel position (front/back) to center panel\n- [x] Shadow on left panel, if left panel position is front \n- [x] FAPanel State Delegate feature\n\n\n### Left Panel Position\n\n| back | front | \n| --- | --- |\n| ![](http://i.imgur.com/f7slmmx.gif) |  ![](http://i.imgur.com/T7AgNl1.gif)\n\n\n### Usage\n\n\n\n```swift\n\n//  Set the Left Panel position\n\nlet rootController: FAPanelController = window?.rootViewController as! FAPanelController\n\nrootController.leftPanelPosition = .front\nrootController.leftPanelPosition = .back\n\n\n```\n\n\n## Features\n---\n\n- [x] Implementation with code \u0026 storyboard\n- [x] Left, right and center panel supported \n- [x] Change left, right or center panel\n- [x] Open left, right or center panel\n- [x] Supports Animations   \n- [x] Multiple Panel configurations\n- [x] Supports status bar preffered style for all panels\n\n\n\n### Transitions supported\n---\n\n- [x] Flip From Left\n- [x] Flip From Right\n- [x] Flip From Top\n- [x] Flip From Bottom\n- [x] Curl Up\n- [x] Curl Down\n- [x] Cross Dissolve\n- [x] Move Up \n- [x] Move Down\n- [x] Move Left\n- [x] Move Right\n- [x] Split Horizontally \n- [x] Split Vertically \n- [x] Dump Fall\n- [x] Box Fade\n\n\n\n### Panel configurations\n\n```swift\n\n\n// Panels width\n\nvar leftPanelWidth : CGFloat = 280  //  It will override the gap percentage value\nvar rightPanelWidth: CGFloat = 280\n\nvar leftPanelGapPercentage : CGFloat = 0.8\nvar rightPanelGapPercentage: CGFloat = 0.8\n\n\n// resizes all subviews as well\n\nvar resizeLeftPanel : Bool = false\nvar resizeRightPanel: Bool = false\n\n\n// Adds push animation on side panels\n\nvar pusheSidePanels: Bool = false\n\n\n// Bounce effects on panel animations\n\nvar bounceOnLeftPanelOpen  : Bool = true\nvar bounceOnRightPanelOpen : Bool = true\nvar bounceOnCenterPanelOpen: Bool = true\n\n\nvar bounceOnLeftPanelClose   : Bool = false\nvar bounceOnRightPanelClose  : Bool = false\nvar bounceOnCenterPanelChange: Bool = true\n\n\nvar bouncePercentage : CGFloat = 0.075\nvar bounceDuration   : CGFloat = 0.1\n\n\n//  Panning Gesture\n\nvar canRecognizePanGesture: Bool = true\n\nvar panFromEdge          : Bool = false\nvar minEdgeForLeftPanel  : CGFloat = 70.0\nvar minEdgeForRightPanel : CGFloat = 70.0\n\nvar canLeftSwipe : Bool = true\nvar canRightSwipe: Bool = true\n\n\n// restricts panning gesture to work for top VC of Navigation/TabBar Controller\n\nvar restrictPanningToTopVC: Bool = true\n\n\n// Handles the interface auto rotation of visible panel\n\nvar handleAutoRotation: Bool = true\n\n\n// Applies corner radius to panels\n\nvar cornerRadius: CGFloat = 0.0\n\n\n// Shadow configurations\n\nopen var shadowColor   : CGColor = UIColor.black.cgColor\nopen var shadowOffset  : CGSize  = CGSize(width: 10.0, height: 0.0)\nopen var shadowOppacity: Float = 0.5\n\n\n// Remove panels from super view when possible\n\nvar unloadRightPanel: Bool = false\nvar unloadLeftPanel : Bool = false\n\n\n// Max animation duration for animations of side panels\n\nvar maxAnimDuration  : CGFloat = 0.20\n\n\n// percentage of screen's width to the centerPanel.view must move for panGesture to succeed\n\nvar minMovePercentage: CGFloat = 0.15\n\n\n// Only Center Panel Change animation\n\nvar changeCenterPanelAnimated : Bool = true\nvar centerPanelTransitionType : FAPanelTransitionType = .crossDissolve\nvar centerPanelTransitionDuration: TimeInterval = 0.60\n\n```\n\n\n\n\n\n\n\n\n\n## Installation\n\n### Cocoapods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\n\nTo integrate FAPanel into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '9.0'\nuse_frameworks!\n\ntarget '\u003cYour Target Name\u003e' do\npod 'FAPanels'\nend\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate FAPanels into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"fahidattique55/FAPanels\" \u003e= 0.2.0\n```\n\nRun `carthage update` to build the framework and drag the built `FAPanels.framework` into your Xcode project.\n\n\n\n\n\n\n## Usage\n\n\n### Step 1 \n\n- Set the root window as FAPanel controller as shown in below image,\n\n![Alt text](http://i.imgur.com/OkPdbBi.png \"FAPanel-Image-Usage\")\n\n\n### Step 2 \n\n- Add the following code in ``` AppDelegate.swift ``` file,\n\n\n```swift\n\n//  Load the Controllers \n\nlet mainStoryboard: UIStoryboard = UIStoryboard(name: \"Main\", bundle: nil)\n\nlet leftMenuVC: LeftMenuVC = mainStoryboard.instantiateViewController(withIdentifier: \"LeftMenuVC\") as! LeftMenuVC\n\nlet rightMenuVC: RightMenuVC = mainStoryboard.instantiateViewController(withIdentifier: \"RightMenuVC\") as! RightMenuVC\n\nlet centerVC: CenterVC = mainStoryboard.instantiateViewController(withIdentifier: \"CenterVC1\") as! CenterVC\nlet centerNavVC = UINavigationController(rootViewController: centerVC)\n\n\n\n\n//  Set the Panel controllers with just two lines of code\n\nlet rootController: FAPanelController = window?.rootViewController as! FAPanelController\nrootController.center(centerNavVC).left(leftMenuVC).right(rightMenuVC)\n\n```\n\n- All done! Run the code and see the magic.\n\n\n\n### Step 2 (Continue - Panel Controllers) \n\n- Don't want to set RightMenuVC then just remove the right panel code i.e, \n\n```swift\n\n//  This is the code to set all panels \n\nrootController.center(centerNavVC).left(leftMenuVC).right(rightMenuVC)\n\n\n//  Updated code which have only left and center panels \n\nrootController.center(centerNavVC).left(leftMenuVC)\n\n\n//  Similarly, if left panel is not needed the remove the left panel code.\n\nrootController.center(centerNavVC).right(rightMenuVC)\n\n\n//  In case you only want the center panel, then update code to\n\nrootController.center(centerNavVC)\n\n```\n\n\n### Step 2 (Continue - Panel Configurations) \n\n- Configre the Panels before setting the panels\n\n```swift\n\n\nrootController.configs.rightPanelWidth = 80\nrootController.configs.bounceOnRightPanelOpen = false\n\n\n\n//  Should Pan from edge? Add these lines of code, \n\nrootController.configs.panFromEdge = false\nrootController.configs.minEdgeForLeftPanel  = 70\nrootController.configs.minEdgeForRightPanel = 70\n\n\nrootController.center(centerNavVC).left(leftMenuVC).right(rightMenuVC)\n\n\n//  For more configurations and their details, Please have a look into ``` FAPanelConfigurations.swift ``` file \n\n```\n\n\n\n\n### Access Panel  \n\n- Panel can be accessed from any view controller,\n\n```swift\n\npanel?.configs = FAPanelConfigurations()\n\n\n```\n\n\n\n### Open/Close Panels  \n\n- Open Left or Right panels with/without animations\n\n```swift\n\npanel?.openLeft(animated: true)\npanel?.openRight(animated: true)\n\n\n```\n\n- Open/Close Panels Preview\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"http://i.imgur.com/1IYEdMn.gif\"\u003e\n        \u003cimg src=\"http://i.imgur.com/1IYEdMn.gif\" height=\"450\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n\n\n\n### Change/Remove Panels\n\n- Change Left, Right or Center Panel from any view controller\n\n\n```swift\n\n//  Change Center panel\n\nlet centerVC: UIViewController = mainStoryboard.instantiateViewController(withIdentifier: \"CenterVC2\")\nlet centerNavVC = UINavigationController(rootViewController: centerVC)\n\npanel!.center(centerNavVC)\n\n\n\n//  Change Left panel\n\nlet leftVC: UIViewController = mainStoryboard.instantiateViewController(withIdentifier: \"LeftVC\")\npanel!.left(leftVC)\n\n\n//  Remove Left panel\n\npanel!.left(nil)\n\n\n```\n\n- Preview, when changing center panel from left/right panels\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"http://i.imgur.com/C7S8Q7h.gif\"\u003e\n        \u003cimg src=\"http://i.imgur.com/C7S8Q7h.gif\" height=\"450\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n\n\n### Change Center Panel (With custom transitions and durations)\n\n- Change Left, Right or Center Panel from any view controller\n\n\n```swift\n\n//  Specify the transition type\n\npanel!.configs.centerPanelTransitionType = .transitionOption     // Transitions supported are mentioned in FAPanelTransitionType\n\n\n//  Specify the transition duration\n\npanel!.configs.centerPanelTransitionDuration = 0.60\n\n\n//  Update the center panel\n\npanel!.center(centerNavVC)\n\n\n```\n\n\n- Transitions Preview\n\n| flipFromLeft | flipFromRight | \n| --- | --- |\n| ![](http://i.imgur.com/QNaDoVE.gif) | ![](http://i.imgur.com/QxPeUxF.gif) |\n\n\n\n| flipFromTop | flipFromBottom \n| --- | --- |\n| ![](http://i.imgur.com/SOoAYHQ.gif) | ![](http://i.imgur.com/dqqFPLE.gif) |\n\n\n\n| curlUp | curlDown | \n| --- | --- |\n| ![](http://i.imgur.com/9Hjhthp.gif) | ![](http://i.imgur.com/BALhgmX.gif)\n\n\n| crossDissolve | moveRight | \n| --- | --- |\n| ![](http://i.imgur.com/siaRAy3.gif) |  ![](http://i.imgur.com/1o4SILl.gif)\n\n\n| moveLeft | moveUp | \n| --- | --- |\n| ![](http://i.imgur.com/dH3HNyv.gif) |  ![](http://i.imgur.com/iENLd4n.gif)\n\n\n| moveDown | splitVertically | \n| --- | --- |\n| ![](http://i.imgur.com/GrQH53P.gif) |  ![](http://i.imgur.com/a7FbLUX.gif)\n\n\n| splitHorizontally | dumpFall | \n| --- | --- |\n| ![](http://i.imgur.com/gsYw0SX.gif) |  ![](http://i.imgur.com/miVZ2nB.gif)\n\n\n| boxFade | \n| --- |\n| ![](http://i.imgur.com/TjniRC2.gif) |\n\n\n\n\n### Supports interface rotation\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"http://i.imgur.com/4dpN8d7.gif\"\u003e\n        \u003cimg src=\"http://i.imgur.com/4dpN8d7.gif\" height=\"450\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n\n\n\n## License\n\nFAPanels is licensed under the Apache License 2.0.\n\nFor more details visit http://www.apache.org/licenses/LICENSE-2.0\n\n\n## Author\n\n**Fahid Attique** - (https://github.com/fahidattique55)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffahidattique55%2FFAPanels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffahidattique55%2FFAPanels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffahidattique55%2FFAPanels/lists"}