【问题标题】:iOS 7 navigation bar background blur effect is not working in iPhone4iOS 7 导航栏背景模糊效果在 iPhone 4 中不起作用
【发布时间】:2014-07-17 09:19:20
【问题描述】:

在 iPhone4 中,导航栏的默认 iOS7 半透明/模糊效果不起作用。 iOS7主题效果我使用了如下代码。

self.edgesForExtendedLayout = UIRectEdgeAll;
self.automaticallyAdjustsScrollViewInsets = YES;
self.extendedLayoutIncludesOpaqueBars = NO;

[[UINavigationBar appearance] setTintColor:[UIColor colorWithWhite:0.0 alpha:0.5]];

注意:在 iPhone4 中,iOS 7.1.2 AppStore 也没有这个效果。而在 iPhone 5 和其他设备中,其应用程序(如 AppStore、Itunes...等)具有默认的 iOS 7 主题效果。

有什么方法可以在 iPhone 4 、iOS 7 中实现这种特殊的 UI 效果。还有你的想法……

【问题讨论】:

    标签: ios ios7


    【解决方案1】:

    出于性能原因,iPhone 4 已删除此功能 - 如果您绝对需要此功能,请在 Github 上查找 custom implementations,它可以在其他设备上使用。

    请记住,Apple 删除此功能是有原因的,最好还是不要这样做!

    【讨论】:

    • 是的,我从 AppStore、Itunes 等应用程序中了解到 iPhone4 中不可用。但我的问题是,有没有办法通过任何定制技术来实现这种 ui 效果。
    【解决方案2】:

    试试这个。让我知道如果它不起作用我会给出另一个解决方案

     self.navigationBar.translucent = YES;
    

    【讨论】:

      猜你喜欢
      • 2015-09-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-17
      • 2015-02-03
      • 2013-11-19
      • 2013-09-26
      • 1970-01-01
      相关资源
      最近更新 更多