[英]Change label in parent viewcontroller container
I'm using a container to show a UIPageViewController on it. 我正在使用一个容器在其上显示UIPageViewController。 As you can see in my image I got a grey bar under the navigation bar with a white Label on it. 正如您在我的图像中看到的那样,导航栏下方有一个灰色栏,上面带有白色标签。 I want to change this label in the "Page Scroll View Controller", how can I do this? 我想在“页面滚动视图控制器”中更改此标签,我该怎么做?
Have you connected that UILabelView
to the property in ViewController
? 您是否已将该UILabelView
连接到ViewController
的属性? If not, then you have to do that first. 如果没有,那么您必须首先这样做。
Declare the property like: 像这样声明属性:
@property (weak, nonatomic) IBOutlet UILabel *blablabla;
Now, after connecting that property to the outlet. 现在,将该属性连接到插座之后。 You can access it in same ViewController
like following: 您可以在相同的ViewController
访问它,如下所示:
self.blablabla.text = @"your text goes here";
Let me know if you are facing any problem! 让我知道您是否遇到任何问题!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.