Reputation: 6774
What is the right way to use SWRevealViewController with Swift? XCode: 6.0.1 I am even having trouble important the file properly :/
MenuViewController.swift
import UIKit
import SWRevealViewController
class MenuViewController: SWRevealViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
}
If someone has a small github they could point me to I would really appreciate it!
Upvotes: 3
Views: 3294
Reputation: 1698
You will have to create a Bridging header file to access all the objective C files in swift. Once you have created the Bridging header, all your import statements would be written inside the bridging header as
You don't have to write the import statements individually in each file as you used to write in Objective C. Once you include the #import statement in the Bridging-Header file, you will be able it in the entire project.
Upvotes: -1
Reputation: 9012
In order to access your Objective C classes from your Swift code, you'll need a bridging header. Apple has a good explanation here:
Swift and Objective-C in the Same Project
Once you have the bridging header:
#import "SWRevealViewController.h"
to the bridging header fileUpvotes: 6