Search code examples
objective-cxcodesubproject

Link Between View Controllers in Subprojects


I have a main project with a storyboard and then I have a subproject that doesn't have a storyboard. I want to have a button on my storyboard of the main project that when tapped takes you into the main view controller of the subproject. Could anyone provide some guidance with this?


Solution

  • You should be able to import any file created in the subproject in your main project using #import <SubProjectName/file.h>

    If that doesn´t work means that you have not setted it up correclty. Make sure is marked as static library in settings. Here is a good explanation: http://www.blog.montgomerie.net/easy-xcode-static-library-subprojects-and-submodules