【发布时间】:2015-05-24 06:06:00
【问题描述】:
在 Xcode 6 中,我正在使用 Objective-C 制作游戏,当你输了时,我希望视图变得模糊。有点像这样,但有点模糊:
【问题讨论】:
标签: ios objective-c sprite-kit
在 Xcode 6 中,我正在使用 Objective-C 制作游戏,当你输了时,我希望视图变得模糊。有点像这样,但有点模糊:
【问题讨论】:
标签: ios objective-c sprite-kit
您必须在 UIVisualEffectsView 中添加 UIBlurEffect。 Here 是一个很好的教程,可以帮助您解决问题。
我建议在提问之前做一些研究,那里有大量的教程,这个问题之前被问过好几次。
【讨论】:
这段代码对我有用:
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; UIVisualEffectView *blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; [blurEffectView setFrame:self.view.bounds]; [self.view addSubview:blurEffectView];
【讨论】: