Quick use of undeclared type '... ViewController'

Hi, I'm starting an iOS student. I have problems installing manually Guillotine Menu https://github.com/Yalantis/GuillotineMenu

Using Xcode 6.3 and iOS8.3

Here's what I did 1) the file and assets of the guillotine menu from the example were added, copied to the selected project target and placed under my file with the project name

2) Created a ViewController in the interface builder and set the class for GuillotineMeneViewController, it was in the drop-down menu

3) In the ViewController, which comes with a single view, I created a button element and a button button in the interface builder, connected the button output to the code

4) The control is dragged into the GuillotineMenuViewController, set in accordance with Custom and the GuillotineMenu class, which was in the drop-down menu

5) In my ViewController, I copied the navigation barcode from the example in viewDidLoad and copied it for segue after that

Tried to start and continue to use the Uneclared type error "guillotineMenuViewController

Here is my ViewController code

import UIKit

class ViewController: UIViewController {

@IBOutlet weak var barButton: UIButton!
override func viewDidLoad() {
    super.viewDidLoad()
    let navBar = self.navigationController!.navigationBar
    navBar.barTintColor = UIColor(red: 65.0 / 255.0, green: 62.0 / 255.0, blue: 79.0 / 255.0, alpha: 1)
    navBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor()]
}

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
    // Your Menu View Controller vew must know the following data for the proper animatio
    let destinationVC = segue.destinationViewController as! GuillotineMenuViewController
    destinationVC.hostNavigationBarHeight = self.navigationController!.navigationBar.frame.size.height
    destinationVC.hostTitleText = self.navigationItem.title
    destinationVC.view.backgroundColor = self.navigationController!.navigationBar.barTintColor
    destinationVC.setMenuButtonWithImage(barButton.imageView!.image!)
}
}
+4
source share
1 answer

Thanks to the help of the people at Yalantis, this is what solved my problem. When I copied the folder to my project, I needed to check the creation groups, and also copy the elements, as usual, I also needed to make sure that the files were added to the phase assembly / compilation of the source code

+1
source

All Articles