[英]Add views to a storyboard programatically
I'm going to explain my situation 1st so that the question is clear. 我将首先解释我的情况,以便使问题清楚。 I'm using a scrollview with images in it right now.
我正在使用带有图像的滚动视图。 Those images right now link to different views in a storyboard.
这些图像现在链接到情节提要中的不同视图。 Instead what I'd like to do is have that image open up a new UIScrollview w/ views displayed.
相反,我想做的是让该图像打开一个新的带有视图的UIScrollview。 These views are already in the storyboard of course without nibs.
当然,这些观点已经存在于故事板上。
So I'm essentially trying to display UIViews in a UIScrollView.. except I cant' initialize with nib (at least to my knowledge). 所以我实质上是想在UIScrollView中显示UIViews。除了我不能用笔尖初始化(至少据我所知)。
如果要在Storyboard中寻找一个设置滚动视图的地方,请使用awakeFromNib
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.