我使用SKStoreProductViewController在我的应用程序中打开应用程序商店。它正在成功演示,但其中的状态栏没有显示,导航栏看起来像是44像素的高度。但这不会发生在任何iOS 8.3v的任何设备上。这种情况仅在所有iOS 8.4v设备中发生。
在我的plist中,UIViewControllerBasedStatusbarAppearance设置为NO。我也尝试了Yes,但没有用。

状态栏中的红色是superview导航栏的颜色。
注意:我正在演示来自我的ParentViewController的SKStoreProductViewController。
任何帮助都将不胜感激。
发布于 2015-09-13 13:59:50
我通过添加statusBar作为UIView组件解决了这个问题,这是解决方案的一个变通办法。我也遇到过类似的问题。
SKStoreProductViewController *_apsvc = [[SKStoreProductViewController alloc]init];
_apsvc.delegate = self;
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
UIView *addStatusBar = [[UIView alloc] init];
//change this to match your navigation bar
UIViewController* viewController = [UIApplication sharedApplication].keyWindow.rootViewController;
addStatusBar.frame = CGRectMake(0, 0, viewController.view.frame.size.width, 20);
addStatusBar.backgroundColor =[UIColor whiteColor];
}
UIViewController* viewController = [UIApplication sharedApplication].keyWindow.rootViewController;
if (viewController)
{
[[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:_apsvc animated:YES completion:^()
{
[_apsvc loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier : AppID}
completionBlock:^(BOOL result, NSError *error) {
if(error)
{
....
}
}];
[viewController.view addSubview:addStatusBar];
}];
}
}
-(void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController
{
[addStatusBar removeFromSuperview];
if (viewController)
{
[viewController dismissViewControllerAnimated:YES completion:nil];
}
}https://stackoverflow.com/questions/32011478
复制相似问题