Tag: icarousel

轮播索引不正确

我有以下plist,我想要在转盘上显示图像。 当我debugging代码时,我看到索引不是顺序的。 当我在debugging时,首先显示index = 0 ,然后下一个项目是index = 5 (lldb) po [items objectAtIndex:index]; http://charcoaldesign.co.uk/AsyncImageView/Forest/IMG_0351.JPG (lldb) po [items objectAtIndex:index]; http://charcoaldesign.co.uk/AsyncImageView/Forest/IMG_0358.JPG 这是实现: – (void)awakeFromNib { //set up data //your carousel should always be driven by an array of //data of some kind – don't store data in your item views //or the recycling mechanism will destroy your data […]

如何实现在iCarousel iPhone不同位置的图像删除function

我正在使用iCarousel如在这里显示的轮播types轮class轮播和实现删除function。我能够删除轮播中的图像,当我试图删除任何其他iomage在可见的屏幕它被移动到轮播框架和删除。 我需要从原来的位置删除图像。 – (void)loadView { [super loadView]; self.view.backgroundColor = [UIColor blackColor]; carousel = [[iCarousel alloc] initWithFrame:CGRectMake(-130,300, 320, 100)]; carousel.dataSource = self; carousel.delegate=self; carousel.type = iCarouselTypeLinear; carousel.scrollEnabled=YES; imageView=[[UIImageView alloc]initWithFrame:CGRectMake(60, 50, 200, 200)]; [self.view addSubview:imageView]; } – (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index reusingView:(UIView *)view { UIImage *image = [imagesArray objectAtIndex:index]; UIButton *button =[UIButton buttonWithType:UIButtonTypeCustom]; button.frame = CGRectMake(0,0, 60, […]

iCarousel不能顺利滚动

我正在使用iCarousel滚动标签。 一切工作正常在模拟器上,但在iPad / iPhone的滚动不顺畅,快捷 这里是代码。 CitiesListView.h #import <UIKit/UIKit.h> #import "iCarousel.h" @interface CitiesListView : UIView <iCarouselDataSource, iCarouselDelegate> @property (nonatomic, retain) iCarousel *carousel; @end CitiesListView.m #import "CitiesListView.h" @interface CitiesListView () @property (nonatomic, retain) NSMutableArray *items; @end @implementation CitiesListView @synthesize carousel; @synthesize items; – (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { [self setUp]; } return self; […]

在iCarousel的iCarouselTypeRotary视图中隐藏图像

我在iCarousel中设置了图像。 当我滚动旋转木马时,它显示前后的图像。 我不想在后面显示图像。 请帮忙。 谢谢。

使用Afnetworking获取UIImageView并将其放入数组中

正如标题所说,我需要得到的图像,并把它放在一个数组中。 UIImageView *myImage = [[UIImageView alloc] init]; [myImage setImageWithURL:[NSURL URLWithString:@"http://host.com/images/1/1.png"] placeholderImage:[UIImage imageNamed:@"page3.png"]]; [items addObject:myImage]; 问题是,当图像被加载,代码继续和没有被放入数组,实际上我想一个空的UIImageView被插入。 我如何去解决这个问题? 在附注中,我使用iCarousel来显示图像,在数据源中它获取图像数组并显示它们。 我可以修改iCarousel吗? 提前致谢。

Mac Dock像放大的iPad一样

我想通过iCarousel库为我的iPad应用程序带来像放大效果的docker。 有了这个,我可以使用下面的一段代码放大转盘的中间项目,但试图缩放中间项目的相邻项目,缩放级别比中间项目稍微小一些。 – (CATransform3D)carousel:(iCarousel *)_carousel itemTransformForOffset: :(CGFloat)offset baseTransform:(CATransform3D)transform { CGFloat MAX_SCALE = 1.95f; //max scale of center item CGFloat MAX_SHIFT = 40.0f; //amount to shift items to keep spacing the same CGFloat shift = fminf(1.0f, fmaxf(-1.0f, offset)); CGFloat scale = 1.0f + (1.0f – fabs(shift)) * (MAX_SCALE – 1.0f); transform = CATransform3DTranslate(transform, offset * _carousel.itemWidth […]

我的自定义button没有得到点击iCarousel iOS?

在我的例子中,我正在使用iCarousel在其中我试图扩大图像点击它? 我做了什么,图像展开后,我在view右下angular添加backButton ,以便我可以返回到原始视图。 但是那个button没有得到点击事件。 我哪里错了? 这是我的代码。 – (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index reusingView:(UIView *)view{ UIButton *button = (UIButton *)view; UIView *buttonBackView=[[UIView alloc]initWithFrame:CGRectMake(0, 0, 475, 300)]; [buttonBackView setBackgroundColor:[UIColor blackColor]]; button = [UIButton buttonWithType:UIButtonTypeCustom]; button.frame = CGRectMake(0.0f, 0.0f, 475,300); UIImage *image=[_rareCSNYArrayImageItems objectAtIndex:index]; [button setBackgroundImage:image forState:UIControlStateNormal]; [button addTarget:self action:@selector(buttonTapped:) forControlEvents:UIControlEventTouchUpInside]; [buttonBackView addSubview:button]; return buttonBackView; } – (void)buttonTapped:(UIButton *)sender { […]

用iCarousel缩放项目

我试图使用iCarousel作为我的解决scheme,我需要实现类似下面的图像 这应该是完全的方式 iCarouselOptionFadeMin iCarouselOptionFadeMax iCarouselOptionFadeRange iCarouselOptionFadeMinAlpha工作使用 – (CGFloat)carousel:(iCarousel *)carousel valueForOption:(iCarouselOption)option withDefault:(CGFloat)value 我试图创build一个完全一样的function – (CGFloat)alphaForItemWithOffset:(CGFloat)offset 我发现它使用offset值来完成,但是事情并没有起作用,任何人都可以帮助我实现这个目标。 谢谢。