Coder Social home page Coder Social logo

dogo / aksidemenu Goto Github PK

View Code? Open in Web Editor NEW
279.0 279.0 49.0 3.75 MB

Beautiful iOS side menu library with parallax effect. Written in Swift

License: MIT License

Ruby 1.86% Swift 98.14%
aksidemenu carthage cocoapods ios parallax sidemenu spm swift swift-package-manager

aksidemenu's Introduction

aksidemenu's People

Contributors

bitomule avatar cs-diogo-autilio avatar dependabot[bot] avatar dogo avatar islamovic avatar jjetrifork avatar macbaginski avatar mrylmz avatar shimbetov avatar yoloabdo avatar youngminah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aksidemenu's Issues

didHideMenuViewController is never called

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.4.3
  • Device OS version: All versions
  • Device Name: All devices
Reproduction Steps
  1. Set some class (such as left menu view controller) as AKSideMenu delegate
  2. Put breakpoint at func sideMenu(_ sideMenu: AKSideMenu, didHideMenuViewController menuViewController: UIViewController) and write print("hello world") to have written proof that things aren't working.
  3. Open and hide left menu
Expected Result

After hide animation is finished debugger should stop at breakpoint or write in console message that we put inside print() function.

Actual Result

func sideMenu(_ sideMenu: AKSideMenu, willHideMenuViewController menuViewController: UIViewController) is called twice instead once. Investigating in code I saw that inside AKSideMenu.swift (line 442) willHideMenuViewController is called instead of didHideMenuViewController inside completion block.

Tell us what could be improved:

Please call didHideMenuViewController in completion block. If needed I can do thing through pull request.

Shadow is not visible

simulator screen shot - iphone 8 - 2018-04-25 at 19 49 50

shadow is not visible

I also write the following code in RootViewController

    self.contentViewShadowColor = .black
    self.contentViewShadowOffset = CGSize(width: 2, height: 2)
    self.contentViewShadowOpacity = 0.6
    self.contentViewShadowRadius = 12
    self.contentViewShadowEnabled = true
    self.backgroundImage = nil

could anyone help me to bring out me from this issue?

Status bar issue

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.3.3
  • Device OS version: 10.1
  • Device Name: iPhone 6
Reproduction Steps
  1. Set scaleContentView to false
  2. Set menuPrefersStatusBarHidden to true
  3. Show left menu
  4. The status bar doesn't disappear
Expected Result

The status bar will disappear by showing the left side menu. If I enable scaleContentView (default it's true) the status bar will hide.

Actual Result

The status bar doesn't disappear by showing the left side menu

Tell us what could be improved:

override open var prefersStatusBarHidden: Bool {
        var statusBarHidden: Bool = false

        statusBarHidden = self.visible ? self.menuPrefersStatusBarHidden : self.contentViewController!.prefersStatusBarHidden
        if self.contentViewContainer.frame.origin.y > 10 {
            statusBarHidden = self.menuPrefersStatusBarHidden
        } else {
            statusBarHidden = self.contentViewController!.prefersStatusBarHidden
        }
        return statusBarHidden
    }

You should change this if condition: if self.contentViewContainer.frame.origin.y > 10 to if self.contentViewContainer.frame.origin.x > 10. Also, you should fix this if condition in override open var preferredStatusBarUpdateAnimation: UIStatusBarAnimation and override open var preferredStatusBarStyle: UIStatusBarStyle

How to implement it on existing navigationController

Hey everyone, i would like to implement this only one class and i don't want to use storyboard version. Because i will show the same class every time when one of menu items picked.

If i use storyboard i have to add segue to class and it will initialise same class every time.

I just want to implement this not in appDelegate but in one of classes in navigationController and when user taps any menu item i will hide menu, change dataSource and show same class again.

I tried it like this but it just freezes when i tap the button.

-  let leftMenuViewController: LeftMenuViewController = LeftMenuViewController()      
-         let sideMenuViewController: AKSideMenu =  AKSideMenu()
-         sideMenuViewController.contentViewController = self.navigationController
-         sideMenuViewController.leftMenuViewController = leftMenuViewController
-         sideMenuViewController.backgroundImage = UIImage(named: "general_bg_small.png")!
-         sideMenuViewController.menuPreferredStatusBarStyle = UIStatusBarStyle.LightContent
-         sideMenuViewController.delegate = self                       
-         sideMenuViewController.contentViewShadowColor = UIColor.blackColor()
-         sideMenuViewController.contentViewShadowOffset = CGSizeMake(0, 0)
-         sideMenuViewController.contentViewShadowOpacity = 0.6
-         sideMenuViewController.contentViewShadowRadius = 12
-         sideMenuViewController.contentViewShadowEnabled = true
-         let leftButton = UIBarButtonItem(image: UIImage(named: "menu_menu_icon"), landscapeImagePhone: UIImage(named: "menu_menu_icon"), style: .Plain, target: self, action: #selector(self.presentLeftMenuViewController(_:)))
-         self.navigationItem.leftBarButtonItem = leftButton

Swift 4 support

Include the following:
  • AKSideMenu version: 1.3.5
  • Device OS version: 11
  • Device Name: iPhone X

Swift 4 Support:

Please maintenance for swift 4 support,
I could help if you guys want.

App Freezing when using on Xcode and normally crash

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.0.0
  • Device OS version: 6.0
  • Device Name: iPhone 5
Reproduction Steps
  1. in my SecondViewController in Menu i have another step to go "Detail Second View Controller"
    if i go their and come back and press menu app get freeze. if i unplug from xcode. it works fine. but it get crash when i go and click play with menu fast. i think something to do with GCD

Calling variable sideMenuViewController in UIViewController extension freezes the app when it is not in view heirarchy

  • I have verified there are no duplicate active or recent bugs, questions, or requests

If in a viewController I access the defined in the UIViewController extension, the app freezes

self.sidemenuViewController

This happens if the side menu is not in the view Heirarchy. The app goes into an infinite loop and app freezes.

Include the following:
  • AKSideMenu version: 1.0.0
  • Device OS version: 6.0
  • Device Name: iPhone 6
Reproduction Steps
  1. Load SideMenu inside a Navigation stack
  2. Instead of pushing a controller from the inside of the side menu, push it directly to the above navigation controller.
  3. In the controller, if the sidemenuViewController property is accessed, the app will freeze.
Expected Result

The property should return nil instead of going into an infinite while loop.

Actual Result

The app goes into an infinite while loop.

Tell us what could be improved:

Sidemenu stuck in swipe

  • [ ✔️] I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.4.2
  • Device OS version: 12.0
  • Device Name: iPhone 6s
Reproduction Steps
  1. add sidemenu using pod
  2. using storyboard like sample
  3. add rightmenu only
Expected Result

swipe and release before fully open must be close or open side menu

Actual Result

menu stuck in the middle of swiping

Tell us what could be improved:

make sidemenu full open or close depends of percentage of swipe to full open

img_1002

How to use only left view controller

Hi, I want to use AKSideMenu only at the left side (there is burger menu in my application), but the empty right view controller still showing when I slide from right side to left. How can I turn off the right view controller? Thanks.

ContentViewCornerRadius is available?

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.0.0
  • Device OS version: 12.1
  • Device Name: iPhone X
Reproduction Steps
Expected Result
Actual Result

Tell us what could be improved:

First, congratulations on this wonderful lib.
I would like to know if there is any possibility of adding a cornerRadius in the contentView.

Thanks

left and right corner show rounded space like there is a corner radius given to side menu ,how to remove it ?

  • [yes ] I have verified there are no duplicate active or recent bugs, questions, or requests
    yes
Include the following:
  • AKSideMenu version: latest version downloaded via pod
  • Device OS version : 12.0
  • Device Name : iPhone 6s
Reproduction Steps
  1. integrated akside menu via podfile
  2. in parent view controller my navigation is custom and its top constraint from superview
  3. still ir is showing rounded white corner at top of navigation bar
Expected Result: should show complete navigation bar without rounded white color at top
Actual Result . currently showing white space at top right and left of the scrren

Screenshot 2019-04-18 at 11 28 23 AM

Tell us what could be improved:

here i attach my screen image in which side menu is opening from left side and if you zoom image you will able to see space at top right and left corner

How to Pass an object from RootViewController to contentViewController

Hi
I want to pass an object(Customer) from RootViewController into contentViewController but I can`t do that.

import UIKit
import AKSideMenu

public class RootViewController: AKSideMenu, AKSideMenuDelegate {

    var customer:Customer = Customer()

    override public func awakeFromNib() {
        super.awakeFromNib()
        self.menuPreferredStatusBarStyle = .lightContent
        self.contentViewShadowColor = .black
        self.contentViewShadowOffset = CGSize(width: 0, height: 0)
        self.contentViewShadowOpacity = 0.6
        self.contentViewShadowRadius = 12
        self.contentViewShadowEnabled = true
        self.backgroundImage = UIImage(named: "sideMenuBackground")
        self.delegate = self
        if let storyboard = self.storyboard {
            self.contentViewController = storyboard.instantiateViewController(withIdentifier: "contentViewController")
            self.rightMenuViewController = storyboard.instantiateViewController(withIdentifier: "rightMenuViewController")
        }
    }
    
    // MARK: - <AKSideMenuDelegate>
    
    public func sideMenu(_ sideMenu: AKSideMenu, willShowMenuViewController menuViewController: UIViewController) {
        print("willShowMenuViewController")
    }
    
    public func sideMenu(_ sideMenu: AKSideMenu, didShowMenuViewController menuViewController: UIViewController) {
        print("didShowMenuViewController")
    }
    
    public func sideMenu(_ sideMenu: AKSideMenu, willHideMenuViewController menuViewController: UIViewController) {
        print("willHideMenuViewController")
    }
    
    public func sideMenu(_ sideMenu: AKSideMenu, didHideMenuViewController menuViewController: UIViewController) {
        print("didHideMenuViewController")
    }
}

Thanks

Memory not manage on Navigation from leftview controller

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.0.0
  • Device OS version: 6.0
  • Device Name: iPhone 6
Reproduction Steps
  1. Just try to tap on menu icon and select an item from table
  2. Check the memory for the debug navigator pane in left hand side.
  3. If you repeat this step, memory increase to 1 gb and app got crashed
Expected Result

Memory should be manage itself

Actual Result

Memory increase unexpectedly while we have used side menu for navigation

Tell us what could be improved:

You should provide the array of content vc in side menu controller

White space on top of scaled ContentViewController

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.4.0
  • Device OS version: 11.0.1
  • Device Name: iPhone 7
Reproduction Steps
  1. Use storyboard solution of AKSideMenu.
  2. Make FirstViewController with NavigationBar (custom backgroundcolor)
  3. Start App and showLeftMenuViewController
Expected Result

I expected to have the NavigationBar at the top of the scaled ViewController without any white space on top of it.

Actual Result

There is a gap between the top of the View an NavigationBar. Setting prefersStatusBarHidden to true or false has no effect regarding this issue. (See following screenshot)

img_3052

Pan gesture issue with MKMapView inside contentViewController

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.3.5
  • Device OS version: 10.3.2
  • Device Name: iPhone 6 Plus
Reproduction Steps
  1. Add a MKMapView inside the contentViewController of the AKSideMenu.
  2. Enable pan gesture configurations in your side menu.
  3. The pan gestures of the side menu will not fire due to the event consumption of MKMapView scroll.
Expected Result

Simultaneously recognized UIPanGestureRecognizer. Enabled pan capability for contentViewController with gestureRecognizers inside.

Actual Result

Pan gestures of side menu is not working simultaneously with other gesture recognizers.

Tell us what could be improved:

Implementing the optional delegate methods of UIGestureRecognizerDelegate to support multiple gesture recognizers and addition of custom properties for behaviour customization.

Push view controller from leftMenuViewController?

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.3.5
  • Device OS version: 12.1
  • Device Name: iPad Pro
Reproduction Steps
  1. Setup as per example
  2. Create button in LeftMenuController to push content

Using code:

self.sideMenuViewController!.navigationController?.pushViewController(eventVC, animated: true)
self.sideMenuViewController!.hideMenuViewController()
Expected Result

Left menu hides and new view is pushed onto navigation stack

Actual Result

Left menu closes

Tell us what could be improved:

Can't use extension.

Hi,

I have added a AKSideMenu through cocoapod in swift project.
I can access methods and properties of AKSideMenu, But can't access UIViewController extension.
Also can't define AKSideMenuDelegate.
See attached screen shot.

error

Failed to verify bitcode in AKSideMenu.framework

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.0.0
  • Device OS version: 12.0
  • Device Name: iPhone 8
Reproduction Steps
  1. archive it using Xcode 10
Expected Result
  1. Error came - Failed to verify bitcode in AKSideMenu.framework/AKSideMenu:
    error: Cannot extract bundle from /var/folders/vg/4lssphnn52zcn_fnwk_57rcm0000gn/T/XcodeDistPipeline.qWy/Root/Payload/XYZ.app/Frameworks/AKSideMenu.framework/AKSideMenu (i386)
Actual Result
  1. This error should not come.

Tell us what could be improved:

Instance member 'autoresizingMask' cannot be used on type 'UIView'

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.0.0
  • Device OS version: 11.4
  • Device Name: iPhone 8 Plus
Reproduction Steps
  1. Build the project.
Expected Result

successfully build.

Actual Result

not able to build the project.

Tell us what could be improved:

can you please solve it.

screen shot 2018-10-29 at 12 23 27 am

Unwind segue error

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.3.5
  • Device OS version: 10.3
  • Device Name: iPhone 6
Reproduction Steps

I should use unwind segue in my app or dissmiss viewController.i am using this code for ViewController transition.
self.sideMenuViewController!.setContentViewController(UINavigationController.init(rootViewController: self.storyboard!.instantiateViewController(withIdentifier: "HighScoreControllerID")), animated: true) self.sideMenuViewController!.hideMenuViewController()

i want to go back with unwind segue. But it is not working. i have tried normal segue then unwind segue is working. Help please

Image on BackgroundImageView is not showing up

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.4.1
  • Device OS version: 12.0
  • Device Name: iPhone 7
Reproduction Steps
  1. Setup AKSidemenu
  2. Assign an image to the backgroundImage property
  3. Background image does not show up
Expected Result

Image should be visible.

Actual Result

screen shot 2018-09-23 at 12 36 37

Tell us what could be improved:

how to call side menu over the context..?

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.0.0
  • Device OS version: 6.0
  • Device Name: iPhone 6
Reproduction Steps
Expected Result
Actual Result

Tell us what could be improved:

UI blocker

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.0.0
  • Device OS version: 6.0
  • Device Name: iPhone 6
Reproduction Steps
  1. Open my app
  2. Browse through
  3. App freezes
Expected Result

Normal flow

Actual Result

App UI freezing

Tell us what could be improved:

I debugged the view and found a uibutton laying on my whole UI window as has been added from nowhere, I didn’t have this issue before using the pod, so I think it’s somehow added wrongly

pop to view controller

How to pop view controller when we switched from menu view controller using following code?
self.sideMenuViewController!.setContentViewController(viewController, animated: true)
self.sideMenuViewController!.hideMenuViewController()

How to show side menu from Other view controller ?

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.0.0
  • Device OS version: 11.0
  • Device Name: iPhone 8
Expected Result

I have login view at the start, now when I get the response I wanted to show the HomeViewController with the Menu Button On the left side and on click of the menu shows the menu and navigate the user to the particular view controller.

Actual Result

Currently, If I create rootViewController and set the Initial view to rootviewcontroller and follow the procedure then I am able to see the menu and move to other screen. But, If I tried to push rootViewController from login to show the homeVIewcontroller then I am not able to see the menu.

Please help me to understand, How I can Show HomeViewController from LoginViewController? Do I need to push the RootViewController and In rootViewController set the contentViewController as HomeViewController?

Tell us what could be improved:

screen shot 2017-12-07 at 3 26 03 pm

Error if there is not rightMenuViewController

in the awakeFromNib i have:

self.contentViewController = self.storyboard!.instantiateViewController(withIdentifier: "ContentViewController")
        self.leftMenuViewController = self.storyboard!.instantiateViewController(withIdentifier: "LeftMenuViewController")
        self.rightMenuViewController = nil

this provokes an exception in showLeftMenuViewController() line 288

 self.rightMenuViewController!.view.isHidden = true

accordingly to the declaration is an optional property so it can be nil

var rightMenuViewController: UIViewController? 

thanks

ContentViewContainer invisible after rotation

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.4.0
  • Device OS version: 11.1
  • Device Name: iPhone 7
Reproduction Steps
  1. Open app in landscape mode.
  2. Make your app show left menu.
  3. now rotate to portrait mode.
Expected Result

The ContentViewContainer should be visible on the right side.

Actual Result

It looks like the ContentViewContainer is rotating out of the right bound of the screen. All steps can be repeated as often as you want to reproduce this issue.

Tell us what could be improved:

Is there a way to fix that?

Issue with modals

Hi I use a AKSideMenu controller as my root vc. I have an issue with modals because if I present a modal over it I can't use the SideMenu property and If I the the presenting vc I got the AKSideMenu which don't have a side menu it self.

TL;DR It would be great that the side menu can use it own side menu property !

How to decrease or increase size of contentView?

Hello,,, Every one

I want to decrease size of Content View which contains menu button .. I have tried all property but It's not decreased.

Example :
When i press menu button on HomeViewController (e.g. "Left") that view more decreased and show full menu (e.g just display only menu button of Homeviewcontroller)

Still crashing a little

Hmmm... I have just now noticed you asked me to check the develop branch on #16.

I am seeing code ala:

if optional  == nil { return }
// and then using optional! (explicitly unwrapped)

... which concerns me a bit. Since I am back here looking at issues because I have had another !-related crash. :)

I am willing to arrange the code to avoid using explicitly unwrapped optionals and use lets and guards instead unless you would rather do it yourself or do something different to avoid crashing. What do you think?

didHideMenuViewController delegate is never called.

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.4.3
  • Device OS version: 12.0
  • Device Name: iPhone X
Issue

willHideMenuViewController delegate is being called instead of didHideMenuViewController.

how to support arabaic language?

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.0.0
  • Device OS version: 6.0
  • Device Name: iPhone 6
Reproduction Steps
Expected Result
Actual Result

Tell us what could be improved:

Black bar in iOS11 devices

Hello,

Noticed some black bar on top of the Navigation Bar when menu is displayed in any device running on iOS11.

simulator screen shot - ipad air - 2017-11-29 at 13 01 45
simulator screen shot - iphone 6s - 2017-11-29 at 12 58 43
simulator screen shot - iphone 6s - 2017-11-29 at 13 02 43

  • AKSideMenu version: 1.4.0
  • Device OS version: 11.1
  • Device Name: Simulator iPhone X, iPad Air, iPhone 6s

Manage corner spaces.

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.0.0
  • Device OS version: 6.0
  • Device Name: iPhone 6
Reproduction Steps
Expected Result
Actual Result

Tell us what could be improved:

Getting corner spaces in content view controller
screenshot 2018-09-28 at 11 20 10 am

How to disable "swipe gesture" on rightViewController?

  • [X ] I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • AKSideMenu version: 1.3.5
  • Device OS version: 11.0
  • Device Name: iPhone 7
Reproduction Steps
  1. place TableView rightviewController
  2. add tableViewAction
    func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
        return true
    }
    
    func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
        if (editingStyle == UITableViewCellEditingStyle.delete) {
            tableView.beginUpdates()
            print("deleting")
            tableView.endUpdates()
            
        }
        
    }

  1. start from right to left swiping on tableViewCell.
Expected Result

TableViewCell action should appear

Actual Result

rootViewController appears

Tell us what could be improved:

property from rightviewController to deactivate swiping

bildschirmfoto 2017-06-26 um 15 27 44

(based on your Demo App)

Improvement to make RightSide Menu as optional

Can you improvise the code to make right side menu to be optional? At present we have to enter Right side and left Side view controllers while initializing AKSideMenu.

Would be great if we make both as optional.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.