iOS将 subview 带回
<p><p>我不想让一个 View 出现在另一个 View 的顶部。</p>
<p>这是我的 View 层次结构:</p>
<p> <a href="/image/KPxeM.png" rel="noreferrer noopener nofollow"><img src="/image/KPxeM.png" alt="enter image description here"/></a> </p>
<p>基本上我想把按钮(重新开始)放在属于 PageViewController 的 UIImageView 前面。所以我希望能够使用图像顶部的按钮进行滚动。</p>
<p>这是我的代码:</p>
<pre><code>- (void)viewDidLoad
{
;
// Create the data model
_pageTitles = @[@"Over 200 Tips and Tricks", @"Discover Hidden Features", @"Bookmark Favorite Tip", @"Free Regular Update"];
_pageImages = @[@"page1.png", @"page2.png", @"page3.png", @"page4.png"];
// Create page view controller
self.pageViewController = ;
self.pageViewController.dataSource = self;
PageContentViewController *startingViewController = ;
NSArray *viewControllers = @;
;
// Change the size of page view controller
self.pageViewController.view.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 30);
;
;
;
}
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>您是否尝试过使用以下代码?</p>
<pre><code>;
</code></pre></p>
<p style="font-size: 20px;">关于iOS将 subview 带回,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/33637912/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/33637912/
</a>
</p>
页:
[1]