gpt4 book ai didi

ios - 如何在容器 View 中添加 ScrollView

转载 作者:行者123 更新时间:2023-12-01 16:28:14 25 4
gpt4 key购买 nike

hi all i am in trouble for my app layout, i want to add scrollview in uicontainor view, i even don't know it is possible or i have to move some other solution.



This is my screen shot of my problem

i want to scroll view in my child view of container view, now i have not idea how to do it.

this is the code which i use to switch view form th uisegmentcontroll.


- (IBAction)segmentcontrol:(UISegmentedControl *)sender {

if (sender.selectedSegmentIndex == 0) {
[UIView animateWithDuration:(0.5) animations:^{
self.secondview.alpha = 1;
self.firstview.alpha = 0;
}];
} else {
[UIView animateWithDuration:(0.5) animations:^{
self.secondview.alpha = 0;
self.firstview.alpha = 1;
}];
}

}

please someone help me, i am editing my question with new layout which i used now.



This is my structure, here i am add a uiscrollview in child view controller

最佳答案

正如您已经拥有 containerView你应该做Embed Controller ,你也已经有了。假设您希望 scrollView 位于 viewController你在哪里 Label位于,第一步是将 ScrollView Controller 拖放到您的 View Controller 上,如果您想要在 ScrollView 中添加一些内容,您可以将其添加到里面。

关于ios - 如何在容器 View 中添加 ScrollView ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33951474/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com