UIVisualEffectView Issues on iPhone 6

import UIKit

class ViewController: UIViewController {

@IBOutlet weak var backgroundImage: UIImageView!

override func viewDidLoad() {

super.viewDidLoad()

var blur = UIBlurEffect(style: .Dark)

var blurView = UIVisualEffectView(effect: blur)

blurView.frame = CGRectMake(0, 0, 400, 320)

self.view.addSubview(blurView)

}

override func didReceiveMemoryWarning() {

super.didReceiveMemoryWarning()

/

}

}



The Problem I'm facing:

The UIVisualEffectView with the Dark Style Blur Effect, which I added to the view programatically (as shown above), renders perfectly on all devices smaller than the iPhone 6. However, on the 6 and 6 Plus the UIVisualEffectView is entirely black when I build and run on the iOS simulator. I need to finish my app project by the end of this week and this is the only aspect of the app which isn't completely functional so any advice would be greatly appreciated! Thanks!

Replies

I'm seeing the same issue. The Visual Effect View is just a solid color.


The blur effect is visible on iPad Mini 2 but not on iPhone 6S.

There isn't any obvious reason why this would be the case only on larger phones, but I might ask why are you hard coding the size of the visual effect view? Is it possibly that it simply isn't displaying over the background image you have and thus just showing a dark color (if there is a solid color behind it, its going to produce a solid color for the effect as well).