Code Monkey home page Code Monkey logo

Comments (11)

darshan2509 avatar darshan2509 commented on September 23, 2024

Hi,
Check if you connected BarButtonItem to action or connected button inside the BarButtonItem to action. You have to connect the button highlighted in blue as per below image.

Thanks

Screen Shot 2019-04-25 at 2 02 56 PM

from dknavigationdrawer.

ZahraAsgharzadeh avatar ZahraAsgharzadeh commented on September 23, 2024

I did the same , and also I put break point in the action and it comes there , but the break point didn't stop at the start of drawerToggle() function , I don't know why .

from dknavigationdrawer.

ZahraAsgharzadeh avatar ZahraAsgharzadeh commented on September 23, 2024

even the viewDidload() method didn't get called in DKNavDrawer class :(

from dknavigationdrawer.

darshan2509 avatar darshan2509 commented on September 23, 2024

can you share your code? i will look into it.

from dknavigationdrawer.

ZahraAsgharzadeh avatar ZahraAsgharzadeh commented on September 23, 2024
//  availableController.swift
//  test
//
//  Created by zahra asg  on 8/12/18.
//  Copyright © 2018 zahra asg. All rights reserved.
//

import UIKit

class availableController: UIViewController, DKNavDrawerDelegate {
    func dkNavDrawerSelection(_ selectionIndex: Int) {
        print(selectionIndex)
    }    
    @IBOutlet private weak var segmentOutlet: UISegmentedControl!
    @IBOutlet private weak var imageGif: UIImageView!
    @IBOutlet private weak var cardview: CardView!
    @IBOutlet private weak var menuBtn: UIButton!

    
    var rootNav: DKNavDrawer?
    
    
    @IBAction func menuAction(_ sender: Any) {
        self.rootNav?.drawerToggle()
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        rootNav = (navigationController as? DKNavDrawer)
        rootNav?.dkNavDrawerDelegate = self
        
        self.navigationItem.title = "title"
    }
}

here is my code , and also the subclass of my UINavigationController is DKNavDrawer

from dknavigationdrawer.

ZahraAsgharzadeh avatar ZahraAsgharzadeh commented on September 23, 2024

what is my problem ?

from dknavigationdrawer.

darshan2509 avatar darshan2509 commented on September 23, 2024

DKNavigationDrawer.zip

Kindly check the above project.

from dknavigationdrawer.

ZahraAsgharzadeh avatar ZahraAsgharzadeh commented on September 23, 2024

oh, It works , I presented this controller from another controller and it causes the problem , it solved with performing segue .
and now I have another question ,
how can I make it to appear from right side not left ???

from dknavigationdrawer.

darshan2509 avatar darshan2509 commented on September 23, 2024

Yes you can, you will have to make minor changes to the code.
If possible i will send you the code by today.

from dknavigationdrawer.

darshan2509 avatar darshan2509 commented on September 23, 2024

// Left Navigation Drawer
// outFrame = CGRect(x: CGFloat(-menuWidth), y: CGFloat(0), width: CGFloat(menuWidth), height: CGFloat(meunHeight))
// inFrame = CGRect(x: CGFloat(0), y: CGFloat(0), width: CGFloat(menuWidth), height: CGFloat(meunHeight))

    // Right Navigation Drawer
    outFrame = CGRect(x: CGFloat(wind.frame.size.width ), y: CGFloat(0), width: CGFloat(menuWidth), height: CGFloat(meunHeight))
    inFrame = CGRect(x: wind.frame.width - CGFloat(menuWidth), y: CGFloat(0), width: CGFloat(menuWidth), height: CGFloat(meunHeight))

Just add/repalce this code in setUpDrawer() method.
Note : I have not tested left navigation, i think it won't give you any issues but you will have to make changes in the pan gesture method.

from dknavigationdrawer.

ZahraAsgharzadeh avatar ZahraAsgharzadeh commented on September 23, 2024

Thanks a million 🌹

from dknavigationdrawer.

Related Issues (3)

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.