Showing views in interface builder outside viewcontroller hierarchy in xcode5

岁酱吖の 提交于 2019-12-11 13:46:27

问题


I often make use of views in interface builder that live outside of the viewcontroller hierarchy (see screen grab below for simple example).

Before upgrading to Xcode5 I could get this view to appear on the storyboard by writing an IBAction outlet and dragging a connection from the code to the view in the storyboard.

If you paused over the button for a moment it would flash and then open up as a view on the storyboard that is then a lot easier to work with.

Since upgrading this function no longer seems available. Has anyone found out how to get these views to appear on the storyboard?

Edit: Using the temporary viewcontroller as described in this answer seems one approach, although fiddly since you need to move the UIView stack between viewcontrollers each time you want to edit the layout. Using a separate XIB is starting to seem like the sanest approach.

https://stackoverflow.com/a/13713385/1060154


回答1:


Finally, we get this back in Xcode 7. Hallelu!



来源:https://stackoverflow.com/questions/19097854/showing-views-in-interface-builder-outside-viewcontroller-hierarchy-in-xcode5

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