高斯模糊

2016-07-13  本文已影响0人  caohuienjoy

左侧按钮多出20像素解决方案: if ([[[UIDevice currentDevice]systemVersion]floatValue]>=7.0?20:0) {
UIBarButtonItem *negativeSpace=[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
negativeSpace.width=-19;
self.navigationItem.leftBarButtonItems=@[negativeSpace,[[UIBarButtonItem alloc]initWithCustomView:self.leftButton]];
}else{
self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc]initWithCustomView:self.leftButton];
}

pragma mark---高斯模糊

}

使用方法: dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSData *data=[NSData dataWithContentsOfURL:[NSURL URLWithString:_AlbumListModel.album.coverLarge]];
dispatch_async(dispatch_get_main_queue(), ^{
[_imageView setImage:[self blurryImage:[UIImage sd_imageWithData:data] withBlurLevel:9] ];

    });
});
上一篇下一篇

猜你喜欢

热点阅读