如何将它们指定为具有标签:
self.images = [NSMutableArray arrayWithObjects:
@"1.jpg",@"2.jpg",@"3.jpg",@"4.jpg",@"5.jpg",nil];每当UIScrollView停在一个特定的图像时,它就会做一些事情/动作/动画。例如,当图像1显示时在左侧绘制框,当图像2在UIScrollView中显示时在右侧绘制框。谢谢。
下面是数组:
- (void)awakeFromNib
{
if (self) {
//set up carousel data
//wrap YES = infinite loop
wrap = YES;
self.images = [NSMutableArray arrayWithObjects:
@"1.jpg",@"2.jpg",@"3.jpg",@"4.jpg",@"5.jpg"nil];
}
}这是我的图片显示的地方:
- (UIView *)carousel:(iCarousel *)_carousel viewForItemAtIndex:(NSUInteger)index reusingView:(UIView *)view
{
view = [[UIImageView alloc] initWithImage:[UIImage imageNamed:[images objectAtIndex:index]]];
return view;
}发布于 2012-05-09 15:36:21
检查图像的x坐标如何?这似乎是一种检查显示的图片的合法方式...如果需要标记,可以使用索引,或者将指向图像的指针存储在字典中。
https://stackoverflow.com/questions/10511342
复制相似问题