dekatotoro / SlideMenuControllerSwift

iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift.
MIT License
3.4k stars 755 forks source link

Not able to import #43

Closed reckonsys-zz closed 8 years ago

reckonsys-zz commented 9 years ago

when i import showing No such Module.

thihaaung6245 commented 9 years ago

how do u import this library from cocoapods? or manual?

reckonsys-zz commented 9 years ago

from cocoapods

thihaaung6245 commented 9 years ago

I think cocoapods is not fully supported yet.Even me,i have to import manually by copying SlideMenuController.swift to my project location.Please see for your self - https://github.com/dekatotoro/SlideMenuControllerSwift/issues/35 . Sometime due xcode 6.3 problem on large project,you might have to clean the whole project and try to rebuild again.

reckonsys-zz commented 9 years ago

I manually Copied but still not able to import

reckonsys-zz commented 9 years ago

May be some problem with file from SlideMenuController.

thihaaung6245 commented 9 years ago

I guess not.I think there is something wrong with your project structure.If u want to be sure,try to create new project and import the SlideMenuViewController.swift manually into your project and use it because i have the same issue like yours which i cant install from cocoapods but,can import manually and work fine for now.

dekatotoro commented 9 years ago

@reckonsys How do you try to do with the latest?

reckonsys-zz commented 9 years ago

i am not using it app.

dekatotoro commented 8 years ago

Cocoapods is already fully supported. Close this issue.

kerimsari commented 8 years ago

Hello,

I've succesfully imported the SlideMenuController from cocoapods.

The problem is that i can not add right and left buttons with the method addRightBarButtonWithImage and addLeftBarButtonWithImage

Please suggest...

Pluto-Y commented 8 years ago

How did you import the SlideMenuController?

kerimsari commented 8 years ago

Hello,

I've imported it with creating a podfile and pod install command.

kerimsari commented 8 years ago

import UIKit import SlideMenuControllerSwift

@UIApplicationMain class AppDelegate: UIResponder ,UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    // Override point for customization after application launch

    // create viewController code..
    let storyboard = UIStoryboard(name: "Main", bundle: NSBundle(identifier: "com.mobilentis.jetforme"))

    let mainViewController = storyboard.instantiateViewControllerWithIdentifier("MainViewController") as! MainViewController
    let leftViewController = storyboard.instantiateViewControllerWithIdentifier("MenuViewController") as! MenuViewController

    let slideMenuController = SlideMenuController(mainViewController: mainViewController, leftMenuViewController: leftViewController)

    self.window?.rootViewController = slideMenuController

    self.window?.makeKeyAndVisible()

    return true
}
Pluto-Y commented 8 years ago

I don't see the code you added the menu button.

kerimsari commented 8 years ago

// // ViewController.swift // jetforme // // Created by Elif on 03/03/16. // Copyright © 2016 Elif. All rights reserved. //

import UIKit import SlideMenuControllerSwift

class MainViewController: SlideMenuController {

override func viewDidLoad() {
    super.viewDidLoad()

    self.view.addBackgroundImage()

}

override func awakeFromNib() {

    if let controller = self.storyboard?.instantiateViewControllerWithIdentifier("MenuViewController") {
        self.leftViewController = controller
    }

    super.awakeFromNib()
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}

override func viewWillAppear(animated: Bool) {
    super.viewWillAppear(animated)

    addLeftBarButtonWithImage(UIImage(named: "ic_menu_black_24dp.png")!)
}

}

Pluto-Y commented 8 years ago

Yes, the left(or right) menu button are added in the navigationBar, but you don't use the UINavigationController.So when you add the menu is useless.

kerimsari commented 8 years ago

Do you have a sample project this library? It would be really helpfull?

Pluto-Y commented 8 years ago

https://github.com/dekatotoro/SlideMenuControllerSwift/ This is the sample project and you can download it for references.

kerimsari commented 8 years ago

I know this but this is not a sample project, this is the whole project I think? No?

Pluto-Y commented 8 years ago

Okay, I change the code you provided for you.

......
    let slideMenuController = SlideMenuController(mainViewController: mainViewController, leftMenuViewController: leftViewController)

    // Add this line
    let navController = UINavigationController(rootViewController: slideMenuController)
    // And change the rootViewController from slideMenuController into navController
    self.window?.rootViewController = navController
......
kerimsari commented 8 years ago

Thank you very much...

Pluto-Y commented 8 years ago

You are welcome.

GaniduAsh commented 8 years ago

tried to copy file , still get the issue that , saying module not found , created a sample project event , still the same issue