jonkykong / SideMenu

Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less.

Repository from Github https://github.comjonkykong/SideMenuRepository from Github https://github.comjonkykong/SideMenu

How to include in Objective-C project?

zionun opened this issue · comments

I have read the guidelines for contributing and I understand

  • My issue is happening in the latest version of SideMenu (older versions are no longer maintained).
  • My issue was not solved in the README.
  • My issue can not be answered on stackoverflow.com.
  • My issue is not a request for new functionality that I am unwilling to build and contribute with a pull request.
  • My issue is reproducible in the demo project.

Describe the bug
A clear and concise description of what the bug is.

Hello, sorry if this has been asked before, but I couldn't find anything that could help me.
I'm trying to use this project inside my Objective-C code (I saw the @objc/@objcMembers syntax so I'm guessing it should be possible) and I'm not using storyboards.
Can the controller be used in this scenario? If so, how?
It seems I correctly imported the module as I'm able to see the classes with autocompletion, but if I try to instantiate a SideMenuNavigationController, I cannot access the initWithRootViewController method.
What am I doing wrong?
Thank you

This is a question for stackoverflow.com.

I had the same problem because some method weren't accessible in obj-c. I had to change some data types (InitializableClass -> NSObject for example). https://github.com/DanielFontes/SideMenu

I had the same problem because some method weren't accessible in obj-c. I had to change some data types (InitializableClass -> NSObject for example). https://github.com/DanielFontes/SideMenu

Works perfectly. Thank you @DanielFontes

how to import header file in objective-c?