title: Casting error using BWWWalkthroughController in Swift for iOS
body: <p>I'm trying to create a custom walkthrough for my iOS app using the open source framework BWWWalkthroughController (link: <a href="https://github.com/ariok/BWWalkthrough" rel="nofollow">https://github.com/ariok/BWWalkthrough</a>) but I can't get it to work!</p>
  
  <p>Here's the class where the error occurs:</p>
  
  <pre><code>import UIKit
  
  class StartPageViewController: UIViewController, BWWalkthroughViewControllerDelegate {
  
  override func viewDidLoad() {
      super.viewDidLoad()
  }
  
  override func viewDidAppear(animated: Bool) {
      super.viewDidAppear(animated)
  
      let userDefaults = NSUserDefaults.standardUserDefaults()
  
      if !userDefaults.boolForKey("walkthroughPresented") {
  
          showWalkthrough()
  
          userDefaults.setBool(true, forKey: "walkthroughPresented")
          userDefaults.synchronize()
      }
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
  }
  
  @IBAction func showWalkthrough(){
  
      // Get view controllers and build the walkthrough
      let stb = UIStoryboard(name: "Walkthrough", bundle: nil)
  </code></pre>
  
  <p><strong><em>let walkthrough = stb.instantiateViewControllerWithIdentifier("walk") as! BWWalkthroughViewController</em></strong> &lt;----- THIS IS WHERE THE ERROR OCCURS</p>
  
  <pre><code>    let page_zero = stb.instantiateViewControllerWithIdentifier("walk0") as! UIViewController
      let page_one = stb.instantiateViewControllerWithIdentifier("walk1") as! UIViewController
      let page_two = stb.instantiateViewControllerWithIdentifier("walk2")as! UIViewController
  
      // Attach the pages to the master
      walkthrough.delegate = self
      walkthrough.addViewController(page_one)
      walkthrough.addViewController(page_two)
      walkthrough.addViewController(page_zero)
  
      self.presentViewController(walkthrough, animated: true, completion: nil)
  }
  
  
  // MARK: - Walkthrough delegate -
  
  func walkthroughPageDidChange(pageNumber: Int) {
      println("Current Page \(pageNumber)")
  }
  
  func walkthroughCloseButtonPressed() {
      self.dismissViewControllerAnimated(true, completion: nil)
  }
  
  }
  </code></pre>
  
  <p>Here's my error: </p>
  
  <pre><code>2015-06-29 00:24:02.951 Up &amp; Down - Minimalistic, Beautiful Counter[13041:715011] Unknown class _TtC43Up &amp; Down - Minimalistic, Beautiful Counter27BWWalkthroughViewController in Interface Builder file.
  Could not cast value of type 'UIViewController' (0x10570c418) to 'Up___Down___Minimalistic__Beautiful_Counter.BWWalkthroughViewController' (0x103972fb0).
  (lldb) 
  </code></pre>
  
  <p>I have made sure all classes are correctly named in IB, and I'm quite sure everything is correctly linked (outlets, actions, etc.) as well (I have looked at many similar-looking questions with no answers working for me. Any ideas what the problem might be? THANKS!</p>