I have an Obj C project that I have added a Swift viewController to.
I'm trying to attach a storyboard to the viewController.
I can programmatically add things to the view but I can not get the storyboard to show up.
I have also tried to use a xib as a vie for the Swift viewController with no luck.
Calling the Swift vie form Obj C from a didSelectRowAtInexPath:
SwiftController *sc = [[SwiftController alloc] init];
[self.navigationController pushViewController:sc animated:YES];
SwiftController.swift:
import Foundation
import UIKit
@objc class SwiftController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// This prints
println("in the scrolling view")
// This works
self.view.backgroundColor = .redColor();
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Storyboard is hooked up correctly:
And this is what I get every time:
Same results happen with a xib.
There are a lot of things in the Apple Docs and on the web and here on SO that deal with many issues "around" this one but I have not found anything that helps me see what I'm doing wrong here. Doing things the way that works or Obj C does not seem to work. Clearly I'm a noob with Swift. Any help would be great. Thanks.