0

I'm working on updating one of my widgets for iOS 10 and in the process its UIVisualEffectView style automatically changed to light. My other widgets that I have not started updating for iOS 10 yet have a dark UIVisualEffectView style.

How can I access the UIVisualEffectView style for my widget?

example of problem

Daniel Storm
  • 18,301
  • 9
  • 84
  • 152

2 Answers2

1

In iOS 10, you are not supposed to use any visual effect. Just give your widget's main view the default background. It will automatically adopt the light blur. And that is the way it is supposed to look.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • I'm not applying any visual effect. I'm referring to the free visual effect that is applied. How would I change the default iOS 10 light style to a dark style? The "Countdown" widget is the one I'm referring to. Sorry if I was unclear. – Daniel Storm Sep 19 '16 at 01:00
  • 1
    You do _not_ change it. That is the point. Look at any of Apple's widgets, such as the weather app's widget. Your job is to look like that on iOS 10. This is made very clear in the new human interface guidelines. – matt Sep 19 '16 at 01:01
  • I know it would be against the HIG but if I so desired how would I access it? Is it possible? – Daniel Storm Sep 19 '16 at 01:04
  • 1
    I think you've already answered your question. To get the old behavior, compile against iOS 9. – matt Sep 19 '16 at 02:49
  • matt is correct - this is reiterated in human interface guidelines - sharing for reference (compile against Xcode 7 / iOS 9 if you want dark behavior): https://developer.apple.com/ios/human-interface-guidelines/extensions/widgets/ – Shaun Oct 21 '16 at 18:19
0

There are no code changes required to get the different colored widgets. The difference is whether or not the developer has compiled on Xcode 8 for iOS 10 and submitted an update to the App Store

Stephen
  • 1,427
  • 1
  • 17
  • 42
  • 1
    I understand. My question is how would I go about achieving a dark styled `UIVisualEffectView` background while still compiling with Xcode8 and iOS 10? – Daniel Storm Sep 19 '16 at 00:17