1

I am using left side menu from this pod. here I have given storyboard side menu button to UISideMenuNavigationController Present Modually Segue and side menu is working fine and here I want to use its delegate methods delegate methods but here i am getting below error why??

I have import it in swift file and just clean the build, restart the mac still same error why?? any idea please help me.

I have written below code:

import UIKit
import SwiftKeychainWrapper
import SideMenu

class ProfileViewController: UIViewController, UITextFieldDelegate {

  override func viewDidLoad() {
      super.viewDidLoad()
  }

  @IBAction func sideMenubtn(_ sender: Any) {
    view?.backgroundColor = UIColor(white: 1, alpha: 0.9)
  }

}

extension ProfileViewController : SideMenuNavigationControllerDelegate {
    func sideMenuWillDisappear(menu: SideMenuNavigationController, animated: Bool) {
       view?.backgroundColor = UIColor.white
    }
}

I got this error:

Use of undeclared type SideMenuNavigationControllerDelegate

Use of undeclared type SideMenuNavigationController

This is small demo project you can find pod installing and error here github demo project

please help me.

Community
  • 1
  • 1
Swift
  • 1,074
  • 12
  • 46

1 Answers1

0

As I can see in your Podfile.lock you are using SideMenu 5.0.3. This is not the latest version of this library. Please use SideMenu 6.4.7. Replace pod 'SideMenu' with pod 'SideMenu', '6.4.7' in your Podfile and run pod update. With SideMenu 6.4.7 your demo project builds without any errors.

Roman Podymov
  • 4,168
  • 4
  • 30
  • 57
  • yes, errors were gone!! but i want left side menu.. in updated version attributes inspector i am not getting `SideMenuNavigationController` to make it `ON` – Swift Dec 27 '19 at 11:33
  • i am getting sidemenu tableview from down, please help – Swift Dec 27 '19 at 12:02
  • `Failed to set (leftSide) user defined inspected property on (UINavigationController): [ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key leftSide.` – Swift Dec 27 '19 at 12:07
  • how can i get left side menu, help please – Swift Dec 27 '19 at 13:26
  • @iPhoneDev In the documentation available at https://github.com/jonkykong/SideMenu I see `let leftMenuNavigationController = SideMenuNavigationController(rootViewController: YourViewController); SideMenuManager.default.leftMenuNavigationController = leftMenuNavigationController`. Do you have it in your project? – Roman Podymov Dec 27 '19 at 13:48
  • No, how to add `SideMenuNavigationController(rootViewController: YourViewController)` – Swift Dec 27 '19 at 14:07
  • @iPhoneDev Is it necessary to use storyboards in your project? – Roman Podymov Dec 27 '19 at 15:14
  • @iPhoneDev I think you should ask another question for this problem, in my answer I already explained how to fix the issue that you described in your question. – Roman Podymov Dec 27 '19 at 16:20