我在 UIControllerView
中有一些 UIScrollView
,带有 UINavigatorController
translucent = NO
,每次该应用程序关闭,当该应用程序确实激活时,屏幕下降并再次出现黑色导航栏。
考虑到 viewWillAppear
或 viewDidAppear
没有引发,我在 UIViewController
中捕获事件
[[NSNotificationCenter defaultCenter]addObserver:self
selector:@selector(didBecomeActive)
name:UIApplicationDidBecomeActiveNotification
object:nil];
}
After evaluate what happens with View, ScrollView and contentView (managed by the ScrollView) I got noticed that the scroll view moved to y= -64.
但是当我在拖动 View 时强制 y=0 时,屏幕顶部会出现黑色区域。
有什么建议吗?
最佳答案
在制作 ScrollView 的 View Controller 中试试这个
- (void)viewDidLoad {
[super viewDidLoad];
self.automaticallyAdjustsScrollViewInsets = NO;
}
关于ios - UIScrollView 在 applicationDidBecomeActive 后关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42901216/