2
当SFSafariViewController关闭时,我需要禁用状态栏的“隐藏动画”。 正常的Facebook登录后,权限请求。在SFSafariViewController关闭,禁用状态栏隐藏动画[iOS 9]
由于使上框架改变一个坏的动画..
在我的故事板,状态栏是隐藏的,我的观点有约束“顶部空间:顶面布置图”
当SFSafariViewController关闭时,我需要禁用状态栏的“隐藏动画”。 正常的Facebook登录后,权限请求。在SFSafariViewController关闭,禁用状态栏隐藏动画[iOS 9]
由于使上框架改变一个坏的动画..
在我的故事板,状态栏是隐藏的,我的观点有约束“顶部空间:顶面布置图”
就找到了解决办法:
如果我创建和本SFSafariViewController
用:
#import <SafariServices/SafariServices.h>
SFSafariViewController *sfc = [[SFSafariViewController alloc] initWithURL:[NSURL URLWithString:@"http://google.com"]];
sfc.delegate = self;
[self presentViewController:sfc animated:YES completion:nil];
实施委托(SFSafariViewControllerDelegate
)甲基od:
- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller
{
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}
VC呈现精美而没有状态栏!并且在解雇期间不会产生不良影响。
仅仅实现委托方法完美的作品,甚至有被Facebook SDK(4.6.0自的CocoaPods)
编辑名为SFSafariViewController
:
做其他测试,貌似委托方法不按预期工作;
但只是执行:
View controller-based status bar appearance : FALSE
在的.plist文件足够隐藏在SFSafariViewController
我尝试添加了'查看基于控制器的状态栏appearance'与状态栏将“NO”设置为Info.plist文件,但不起作用。 –
另外使用'setStatusBarHidden'已在iOS 9中弃用。 – ABeanSits