2016-04-28 52 views
1
VC *newView = [self.storyboard instantiateViewControllerWithIdentifier:@"VCUI"]; 
[newView setBackgroundColor:[UIColor clearColor]]; 
[newView view]; 
UIPopoverController * popoverController = [[UIPopoverController alloc] initWithContentViewController:newView]; 
[popoverController setBackgroundColor:[UIColor clearColor]]; 
[popoverController presentPopoverFromRect:sender.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES]; 

为什么透明背景不同看到的iPad 2比iPad的空气2透明背景的不同看到的iPad 2比iPad的空气2

ipad2 ipad air 2

+0

可能重复[UIToolbar不是透明的iPad2(http://stackoverflow.com/questions/30178756/uitoolbar -not透明-上的ipad2) – luiyezheng

+0

透明背景上的iPad 2和可见的iPad空气2不可见。检查图片。 –

回答

0

@foundry回答在这个岗位 UIToolbar not transparent on iPad2

半透明 - 使用模糊 - 在计算上花费很大。

如果你比较iPad 2的 和iPad空气之间的控制面板或通知菜单, - 你会看到,苹果已经禁用半透明的 较低的用电设备,因为它不能真正应对。

这适用于iPad2的,iPad3的,iPad的迷你,也许一些老的iPhone 和iPod Touch上。如果您过度使用这些效果,则即使功率更高的设备也可能会导致效果不佳。

如果你需要一个完全一致的外观和感觉,你应该使用利用半透明的,模糊效果属性抵抗 。 另一种选择是玩弄视图阿尔法,背景颜色 和色调以获得不支持 半透明装置半tranparent的样子。

由于iPad2是低功耗设备,半透明禁用。这就是为什么透明背景在您的项目中不可见。

如果你想知道,如果一个设备支持半透明,你可以看看这个帖子Check if device supports blur