Can't see UIView after added to UIViewController in storyboard separately in latest xcode 5

大兔子大兔子 提交于 2019-12-01 16:11:50
Mundi

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.

Abhinav

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?

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:-

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!