2

I am developing an AppleWatch app using watchOS 2. I am trying to access the Interface.storyboard file in a controller.swift file. I tried following code:

let storyboard =  UIStoryboard(name: "Interface", bundle: nil)
let interfaceController = storyboard.instantiateViewControllerWithIdentifier("InterfaceControllerPage") as! InterfaceController

But it gives me following error on first line - Use of unresolved identifier 'UIStoryboard'

So how do I access Storyboard in watchkit?

Basically I am trying to go back to initial view from the last view, so trying to follow the accepted answer at this link.

Thanks!

Community
  • 1
  • 1
user2312896
  • 389
  • 3
  • 14
  • 1
    Do you really need to access the storyboard to go back to initial view ? WatchKit OS might not give you access to the storyboard. But, you could use popToRootController on WKInterfaceController to go back to initial view controller. – Sandeep Jul 14 '15 at 18:11
  • Thanks @GeneratorOfOne ! I think I just needed popToRootController, no need to access storyboard anymore. – user2312896 Jul 14 '15 at 18:20

0 Answers0