m1entus / MZFormSheetPresentationController

MZFormSheetPresentationController provides an alternative to the native iOS UIModalPresentationFormSheet, adding support for iPhone and additional opportunities to setup UIPresentationController size and feel form sheet.
MIT License
973 stars 146 forks source link

Background turns light grey instead of blurred? #21

Closed JulesMoorhouse closed 9 years ago

JulesMoorhouse commented 9 years ago

Hi,

I have exactly the same issue that I have with MZFormSheetController.

https://github.com/m1entus/MZFormSheetController/issues/182

I've adding my viewcontroller to my navigation controller programmatically, rather than with my storyboard, although I don't know why that should make a difference.

I now have.

Any ideas?

UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];

nav.navigationBarHidden = YES;

MZFormSheetPresentationController *formSheetController = 
    [[MZFormSheetPresentationController alloc] 
     initWithContentViewController:nav];
formSheetController.shouldApplyBackgroundBlurEffect = YES;
formSheetController.blurEffectStyle = UIBlurEffectStyleExtraLight;
// To set blur effect color, but uglty animation
//    formSheetController.backgroundColor = [[UIColor redColor] colorWithAlphaComponent:0.8];

[self presentViewController:formSheetController animated:YES completion:nil];
JulesMoorhouse commented 9 years ago

I fixed this problem with MZFormSheetController maybe the same applies here.

JulesMoorhouse commented 9 years ago

I'd like to re-open this as it doesn't matter what I do I have the same problem.

If I set shouldApplyBackgroundBlurEffect = YES I get a light grey color, if I don't set it, it respects the blurEffectStyle value. I'm using iOS 8.

Please help me.

:(

Thanks in advance.

manumax commented 9 years ago

Since MZFormSheetPresentationController relies on UIVisualEffectView to show blurred background, you're getting that grey background because your device (real or emulated) does not support blurring (see http://stackoverflow.com/questions/26411227/detect-if-device-properly-displays-uivisualeffectview).

m1entus commented 9 years ago

Thanks for explanation. I am closing it.

JosephZZ commented 8 years ago

it's still the case for me. my Base SDK is 9.2 and targeting 8.0, but still only have a dimming light instead of blurry effect

m1entus commented 8 years ago

You will never get blur using UIVisualEffect on ipad 2 and iphone 4, ios version does,t matter because this devices don't support blur...

JulesMoorhouse commented 8 years ago

I used marypopin instead, think it may provide its own blur effect for those devices, can't recall

m1entus commented 8 years ago

Yes it is possible using snapshot and blurry it but i don't wont implement it only for those devices

JosephZZ commented 8 years ago

i just found out it was a problem else where in my own code. sorry for the trouble and thanks for trying to help!

natanrolnik commented 8 years ago

@JosephZZ what was the problem?

JosephZZ commented 8 years ago

@natanrolnik I missed a line of code that the document specifies. It was setting some value to true I think.

dworak commented 8 years ago

When you turn on option in iPhone Settings called: Reduce Transparency for better contrast and readability you're gonna loose the blur effects.