我需要在单个视图中显示图像数组,这些图像在icarousel(时间机器,封面流等等)中具有各种效果.我将使用单一样式,其中所有图像都必须显示..这是我的代码.M文件..
UIImage *img=[[UIImageView alloc]initWithFrame:CGRectMake(30, 30, 290, 400)];
NSLog(@"hi");
img.image=[NSArray arrayWithObjects:[UIImage imageNamed:@"Cover_0.png"],
[UIImage imageNamed:@"Cover_1.png"],
[UIImage imageNamed:@"Cover_2.png"],
[UIImage imageNamed:@"Cover_3.png"],
[UIImage imageNamed:@"Cover_4.png"],
[UIImage imageNamed:@"Cover_5.png"],
[UIImage imageNamed:@"Cover_6.png"],
[UIImage imageNamed:@"Cover_7.png"],nil];
Run Code Online (Sandbox Code Playgroud)
但它没有用......任何人都可以帮忙...
我正在使用iCarousel显示图像,它的显示类型carousel.type = iCarouselTypeRotary;一切正常,但我需要对其显示UI进行一些更改.我想只显示中心视图显示原始alpha和颜色与突出显示其他最近的两个视图显示黑暗.我做谷歌但没有罚款任何解决方案.请给我一些建议或指导如何实现这一目标.
我使用截图Bellow解释这个: -
恭维iCarousel显示图像像这样: -

我想显示像最近的两个图像视图中心imageview像波纹管: -

请帮助我谢谢你.
我正在使用iCarousal,我必须在我的iCarousal视图中使用三个webview,五个imageview和两个Labels共10个iCarousal视图.我需要做的是根据下面的标记获取标签,webviews和imageview方法并在iCarousel移动时更改其值.
- (void)carouselCurrentItemIndexDidChange:(iCarousel *)objcarousel
Run Code Online (Sandbox Code Playgroud)
我正在获取iCarousel的当前索引objcarousel.currentItemIndex但是当我用标记获取视图时,我无法获取当前视图.它给出了第二个下一个视图.
码:
- (NSUInteger)numberOfItemsInCarousel:(iCarousel *)carousel
{
return MainIndexArray.count;
}
- (void)carouselCurrentItemIndexDidChange:(iCarousel *)carousel1
{
if(carousel1.currentItemIndex<3)
{
}
else
{
UIWebView *WEB=(UIWebView *) [carousel1 viewWithTag:2];
NSLog(@"WEB====%@",WEB);
[WEB stopLoading];
static NSString *youTubeVideoHTML = @"<!DOCTYPE html><html><head><style>body{margin:0px 0px 0px 0px;}</style></head> <body> <div id=\"player\"></div> <script> var tag = document.createElement('script'); tag.src = \"http://www.youtube.com/player_api\"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); var player; function onYouTubePlayerAPIReady() { player = new YT.Player('player', { width:'%0.0f', height:'%0.0f', videoId:'%@', events: { 'onReady': onPlayerReady, } }); } function onPlayerReady(event) …Run Code Online (Sandbox Code Playgroud) 我试图通过两侧淡入淡出实现左侧iCarousel对象的权利.
所以我将GtiHub项目导入我的应用程序,为iCarousel分配了一个UIView ...将它链接到我的MainViewController上的IBOutLet并传递了Delegate以及DataSource,就像UITableViewController一样.
虽然它不会出现,我不确定可能导致这个问题的原因.
我的iCarousel DataSource是一个NSMutableArray*项目; 设计如下:
for (int i = 0; i < 100; i++)
{
[_items addObject:@(i)];
}
Run Code Online (Sandbox Code Playgroud)
我正在ViewDidLoad中初始化iCarousel,如下所示
- (void)viewDidLoad
{
[super viewDidLoad];
//Initialize Carousel
_carousel = [[iCarousel alloc] init];
_carousel.delegate = self;
_carousel.dataSource = self;
//Carousel Testing Data
for (int i = 0; i < 100; i++)
{
[_items addObject:@(i)];
}
//configure carousel
_carousel.type = iCarouselTypeRotary;
}
Run Code Online (Sandbox Code Playgroud)
我的旋转木马代表方法如下:
#pragma mark -
#pragma mark iCarousel methods
- (NSUInteger)numberOfItemsInCarousel:(iCarousel *)carousel
{
//return the total number of items in …Run Code Online (Sandbox Code Playgroud) 我正在使用ICarousel制作我的电子相册.滑动相册时,ICarousel的默认设置是它将移动到一定距离.我需要的是只滑动一次一张图片.我发现ICarousel不是基于ScrollView,所以我无法弄清楚如何实现我的目的,有人了解它吗?
我使用开源,iCarousel在我的应用程序中带来轮播控件.我使用的旋转木马类型是iCarouselTypeRotary这种类型的图像线性排列.但是,我需要像附加图像中的旋转木马一样带来图像.我应该怎样做才能使我的旋转木马在顶视图中倾斜为下图中的样式?请帮助.提前致谢.

我在我的iPad应用程序中使用iCarousel,我想知道是否有办法在选择时动态更改中心项目的视图.总之,我想实现这样的目标
我设法将第一个索引(项目 - 0)设置为红色,但我无法找到一种方法来执行以下操作:
当选择1时,我希望将0的图像更改为纯白色,将1的图像更改为红色.
也是2件事.
任何帮助或建议将不胜感激.
谢谢
我需要以某种方式实现iCarousel,使它看起来像这样: 
我已经完成了所有修改,使它看起来像这样,但现在问题是iCarousel使用焦点中的中心图像.我可以这样做,如果只有两个图像,它们不会出现在中心而是出现在左边?把它想象成"左缩进"的内容.
我该怎么做呢?
在我的例子中,我正在使用iCarousel,我试图在点击它时扩展图像?我做了什么,在图像扩展后我添加backButton到右下角,view以便我可以返回到原始视图.但是那个按钮没有获得点击事件.我哪里错了?
这是我的代码.
- (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
{
UIButton *button=(UIButton*)sender;
[button setFrame:CGRectMake(0,0,675,400)];
[button.superview setFrame:CGRectMake(-100, -70, 675, 500)];
UIButton *buttonReduce=[[UIButton alloc] initWithFrame:CGRectMake(580, 405, 85, 85)];
[buttonReduce setBackgroundColor:[UIColor clearColor]];
[buttonReduce setBackgroundImage:[UIImage imageNamed:@"reducebuutton.png" ] …Run Code Online (Sandbox Code Playgroud) 我需要通过迅速在iCarousel中设置.Wrap选项。
这是我的代码。
func carousel(carousel: iCarousel!, valueForOption option: iCarouselOption, withDefault value: CGFloat) -> CGFloat
switch (option)
{
case .Spacing:
return value * 1.1
case .Wrap:
return true
// Error cannot convert return expression
default:
return value
}
}
Run Code Online (Sandbox Code Playgroud)
但是我不能在.Wrap选项上返回true。
我怎样才能解决这个问题?谢谢!
icarousel ×10
ios ×9
iphone ×5
objective-c ×4
ipad ×2
uiview ×2
carousel ×1
cocoa-touch ×1
delegates ×1
swift ×1
uibutton ×1
uiimage ×1
viewwithtag ×1
xcode ×1