In Xcode 6, I'm making a game in Objective-C and when you lose I want the view to be blurred. Kind of like this, but a little less blurred:
Asked
Active
Viewed 227 times
-3
rmaddy
- 307,833
- 40
- 508
- 550
Young_Programmer
- 9
- 4
2 Answers
1
You will have to add a UIBlurEffect in a UIVisualEffectsView. Here is a good tutorial that might help you solve your problem.
I would recommend doing some research before asking, there are tons of tutorials out there and this question was asked several times before.
LinusGeffarth
- 24,641
- 28
- 109
- 162
0
This code worked for me:
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; UIVisualEffectView *blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; [blurEffectView setFrame:self.view.bounds]; [self.view addSubview:blurEffectView];
Young_Programmer
- 9
- 4