I have a UIViewController I created in my apps storyboard, as well as a custom UIViewController subclass which I added to the project (and is correctly in the compile phase
for my case, somehow bundle resources got deleted, so I added back and worked!
Build Phases -> Add Build Phase -> Copy Bundle Resources find your file Then drag and drop your file there
Then make sure your target membership is checked.
You can fix this by editing the XML of your Storyboard.
Right-click your My.storyboard
entry in the Project Navigator panel and select the Open As->SourceCode menu choice. Find your view controller entry in the XML, and add the attribute customClass="MyController"
.
Save the storyboard.
Right-click your My.storyboard
entry in the Project Navigator panel again, and select the Open As->Interface Builder - Storyboard menu choice.
The custom class entry will now contain your MyController
class name.
none of the above(or below :) helped me. though I found that
if I select my viewcontroller in storyboard and try to assign my class to it - my class is not there
BUT
if I click on a view that is in the viewcontroller itself then click on a class dropdown menu in Custom Class
AND THEN
select viewcontroller (click on a bar below the viewcontroller) and now again click on a class dropdown in Custom Class my newly added class magically shows up.
weird, must be a bug with refreshing. Xcode Version 5.1 (5B130a)
Two ways I found that solve the problem but they are work arounds. 1. Just type the view controllers name in the text field, or 2. close the project and then reopen it and in the project initialization it places the file on the list.
Make sure your class inherits from UIViewController.
@interface ClassName : UIViewController
What worked for me was, click on the file in the Project Navigator, then, in the File Inspector under "Identity and Type" beneath the "Location" dropdown box, click on the little folder icon and then select the file in the popup window.