gpt4 book ai didi

ios - pushViewController 使用 hidesBottomBarWhenPushed (iphone6) 导致 autoLayout 问题

转载 作者:可可西里 更新时间:2023-11-01 17:16:46 26 4
gpt4 key购买 nike

我有一个带有 TabBarControllerNavigationControllerFirstViewController(TabBarController > NavigationController > UIViewController)

当按下 firstViewController 上的 UIButton 时,它将推送到 SecondViewController

SecondViewController *vc2 = [self.storyboard instantiateViewControllerWithIdentifier:@"BVC"];

vc2.hidesBottomBarWhenPushed = YES;

[self.navigationController pushViewController:vc2 animated:YES];

SecondViewController 中,右下角有一个 UILabel 带有 Constraints - ( Width-Equal, Height-Equal, TrailingSpaceToSuperView = 16,BottomSpaceToBottomLayoutGuide = 20 )

结果在iphone4s(IOS7)上运行良好,但在iphone6(IOS8.1)上,UILabel会首先出现在右下角加上一个“BottomBar height”大约1秒然后会更新到正确的位置 (BottomSpaceToBottomLayoutGuide = 20)

当我将 pushViewController 动画设置为 NO 时,UILabel 将立即显示在正确的位置。

[self.navigationController pushViewController:vc2 animated:NO];

有人遇到同样的问题吗?

最佳答案

我已经解决了这个问题。选择 BottomSpaceToBottomLayoutGuide 约束的底部。

enter image description here

关于ios - pushViewController 使用 hidesBottomBarWhenPushed (iphone6) 导致 autoLayout 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27266754/

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