2013-09-23 39 views
2

我已经能够使用该库创建的UIView模糊: https://github.com/nicklockwood/FXBlurView创建的iOS上的UITableView的细胞7风格的模糊

这是非常好的和工作,我已经尝试过的UITableView相同的,但它确实不行。 有没有人有任何其他想法?

编辑:

我能得到它FXBlurView工作,刚刚玩弄层

+0

尝试此链接https://github.com/youknowone/UI7Kit – sabeer

+0

好的图书馆,但他们不支持模糊 – Jatin

+0

没有ü找到它的解决方案? – PK86

回答

2

这是一个令人惊讶的优雅的解决方案。使用UIToolBar,后台视图(实时)会自动带有模糊效果。只需将其设置为backgroundview即可。

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 

     // Do all your other stuff for setting up this cell. 

     // Set the background view of the cell as UIToolbar for iOS 7 where it's translucent, picking up background view effect with blur. 
     UIToolbar *translucentView = [[UIToolbar alloc] initWithFrame:CGRectZero]; 

     cell.backgroundView = translucentView; 
     //[translucentView release]; // If you are using retain/release for memory management(non-ARC). 
     return cell; 
    } 
+3

它落后于tableview – Tom

+1

对不起,我不明白你是什么意思“lag tableview ”。如果你怀疑解决方案,我向你保证,我已经在tableview的示例项目中尝试过它,它确实工作正常。 – Ashok

+0

滞后意味着滞后,滚动时 – Tom

1

将FXBlurView设置为tableViewbackgroundView属性。

self.tableView.backgroundColor = [UIColor clearColor]; 
self.tableView.backgroundView = blurView;