0
Я использую iCarouselTypeCoverFlow библиотеки в моем приложении. Я хочу размыть обратные изображения.Blur Назад Изображения в ICarousel
Я могу размыть изображения в viewForItemAtIndex. но при прокрутке я не могу обновить. вот мой код viewForItemAtindex
- (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index
{
image = [items objectAtIndex:index];
button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, image.size.width, image.size.height)];
[button setBackgroundImage:image forState:UIControlStateNormal];
[button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
button.titleLabel.font = [button.titleLabel.font fontWithSize:50];
button.tag=index;
//NSLog(@"%d %d",carousel.currentItemIndex,index);
if (selectedindex == index) {
[button setBackgroundImage:[items objectAtIndex:index] forState:UIControlStateNormal];
}
else {
[button setBackgroundImage:[self blurredImageWithImage:[items objectAtIndex:index]] forState:UIControlStateNormal];
}
return button;
}
и вот мой didscroll
- (void)carouselDidScroll:(iCarousel *)carousel
{
NSInteger current = (carousel.currentItemIndex);
// NSLog(@"%d", current);
NSInteger nextIndex = (carousel.currentItemIndex + 1) % carousel.numberOfItems;
// NSLog(@"%d", nextIndex);
NSInteger prevIndex = (carousel.currentItemIndex + carousel.numberOfItems - 1) % carousel.numberOfItems;
// NSLog(@"%d", prevIndex);
}
Любое предложение или помощь будет оценена.