我正在实现 LiveFrost LFGlassView 并尝试添加动画 View ,但 LFGLassView 似乎无法在动画发生时动态地卡住它覆盖的任何内容。
LFGlassView *view = [[LFGlassView alloc] initwithframe:CGMakeRect(0,0,320,300)];
[self.view addSubview:view];
[UIView animateWithDuration:1.0f animations:^(void) {
[view setCenter:CGPointMake(0,400)];
}];
最佳答案
我从未使用过它,但过去曾看到其他人使用过。根据我之前阅读的内容,您需要将其添加为您希望模糊的 View 的 subview 。
例如:
模糊self.view
[self.view addSubview:view];
第一次谷歌搜索我得到了以下信息。
之前在开发者网站上问过类似的问题,他的回答是:
The idea is that the developer should be able to blur any target layer of their choosing that is part of any view hierarchy in the app. The Core Animation API makes this part a bit tricky to pull off and make it work across a wide range of use cases, but I'll find some way to make it work.
另一个类似的request关于动画模糊半径:
引用:
It's not quite as high on the list of priorities right now, but that would probably be our next major release, 2.0 or something like that.
As for blurradius, we do enough pre-caching that making blurradius animatable will probably be really, really slow. But I think it's still worth trying.
那是 3 个月前。可能无法在这里解决您的问题,但至少会为您提供一些有关动画问题/功能的信息。帮不上什么忙,因为我从未使用过它。
关于ios - 带有 LiveFrost LFGlassView 的 UIView 动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23325061/