问题
I have drag & drop UIView to UIViewController in storyboard in xcode 5, it's added but i can't see that UIView in storyboard. Any one have solution?
In previous version of xcode, i did get it worked with the process described from following link:- https://stackoverflow.com/a/14515818/952440
But now it did not work in latest xcode 5.
For your information i have added screenshot from storyboard below:-


回答1:
You have to add these views as subviews of the main view. Just drag them into the top View
.
If you don't want to show them by default, set them as hidden and show them dynamically.
To edit them, you could create them in a separate xib and then copy-paste. That being said, I do not recommend to put views into storyboard that are not part of the application flow (the "story"). That is what xibs are for. If, however, the views really belong to this controller, then add them as subviews as suggested above.
回答2:
First of all your custom views "forgotPasswordView" and "SignUpView" must be subviews of your viewcontroller's view (LoginSignUp View Controller). From the screenshot it appears to lie outside and that is why they are not appearing up. You can simply drag and drop them at right place.
Additionally, make sure in your custom view classes you are implementing "initWithCode" initialization method for any initialization code.
Also see for reference:
How can I make my UIView visible in Xcode's Storyboard editor?
回答3:
Now, we can see view outside of UIViewController in storyboard in Xcode 7.
For your information i have added screenshot from Xcode 7.1 storyboard below:-
来源:https://stackoverflow.com/questions/18931764/cant-see-uiview-after-added-to-uiviewcontroller-in-storyboard-separately-in-lat