iOS 8 vibrancy image not showing on device

前端 未结 1 1418
我在风中等你
我在风中等你 2021-01-21 15:29

So I created a simple app using Xcode for iOS 8, and used the new \"Visual Effects View with Blur and Vibrancy\" object in the interface builder. It works great for text but all

1条回答
  •  清歌不尽
    2021-01-21 15:41

    Here's a partial solution: switch your image in the asset catalog to be a template image:

    enter image description here

    At least this way you'll see something on the device.

    EDIT Actually, Apple is explicit about this. I quote from the UIVisualEffectView.h header:

    UIImageView will need its image to have a rendering mode of UIImageRenderingModeAlwaysTemplate to receive the proper effect.

    0 讨论(0)
提交回复
热议问题