标签: icarousel

试图将iCarousel实施到我的项目中,但没有任何东西出现 - 我做错了什么?

我正在尝试使用iCarousel库在我的应用程序中实现轮播类型选择器,但是当我加载应该显示轮播的视图时,什么都没有出现.

这是相关的代码:

iCarousel委托方法:

- (NSUInteger)numberOfItemsInCarousel:(iCarousel *)carousel {
    return 65;
}

- (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index reusingView:(UIView *)view {
    // Create a number label representing a numeric WPM option
    UILabel *numberLabel = nil;

    // Create new view if no view is available for recycling
    if (!view) {
        view = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 220, 60)];
        numberLabel = [[UILabel alloc] initWithFrame:view.bounds];
        numberLabel.backgroundColor = [UIColor clearColor];
        numberLabel.textColor = [UIColor whiteColor];
        numberLabel.textAlignment = NSTextAlignmentCenter;
        numberLabel.tag = 1;

        [view addSubview:numberLabel];
    }
    else {
        numberLabel = …
Run Code Online (Sandbox Code Playgroud)

objective-c ios icarousel

3
推荐指数
1
解决办法
1088
查看次数

单击后退按钮时,iCarousel显示在上一页中

当我按下后退按钮.的iCarousel是仍显示为1个second.why是这种情况发生以及如何阻止this.I已经用故事创造一个iCarosel观点..

- (void)viewDidUnload
{
    [super viewDidUnload];
    self.carousel = nil;
}
- (void)dealloc
{
    carousel.delegate = nil;
    carousel.dataSource = nil;
}

- (NSUInteger)numberOfItemsInCarousel:(iCarousel *)carousel
{
  return [idOfAllWords count];
}

- (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index reusingView:(UIView *)view
{
    UILabel *label = nil;

    //create new view if no view is available for recycling
    if (view == nil)
    {
        view = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 250.0f, 250.0f)];
        ((UIImageView *)view).image = [UIImage imageNamed:@"page.png"];
        view.contentMode = UIViewContentModeCenter;
        label = [[UILabel alloc] initWithFrame:view.bounds];
        label.backgroundColor = …
Run Code Online (Sandbox Code Playgroud)

iphone ios icarousel

3
推荐指数
1
解决办法
612
查看次数

在iCarousel中进行分页

我需要在iCarousel中实现分页.我已经将iCarousel与iCarouselTypeLinear集成,之后我编写了以下代码:

UIView *bandImageView = [[UIView alloc] initWithFrame:CGRectMake(350, 300, 100, 20)];
bandImageView.backgroundColor = [UIColor redColor];
[self.view addSubview:bandImageView];
Run Code Online (Sandbox Code Playgroud)

此代码在Carousel下面创建了一个红色区域,我想在其中显示分页控件.

什么是我实现分页下一步iCarousel.

Zeeshan Jan

xcode ipad ios icarousel

2
推荐指数
1
解决办法
2499
查看次数

iCarousel在swift 1.2版错误中(候选不是Objc但协议需要它)

我在swift 1.2中遇到以下错误:'RootViewController'不符合协议'iCarouselDataSource'

在下面的课程中,当我尝试实现第三方库iCarousel时:

class RootViewController: UIViewController,iCarouselDataSource,iCarouselDelegate
{...}
Run Code Online (Sandbox Code Playgroud)

自动修复工具在此方法中放置符合协议的@objc标记:

@objc func carousel(carousel: iCarousel!, viewForItemAtIndex index: Int, var reusingView view: UIView?) -> UIView?
{}
Run Code Online (Sandbox Code Playgroud)

但是出现了另一个错误: 方法无法标记为@objc,因为参数3的类型无法在Objective-C中表示

感谢任何帮助或线索,谢谢!

objective-c icarousel swift

2
推荐指数
1
解决办法
1638
查看次数

在iCarousel项目之间添加空间

iCarousel在我的Objective-C应用程序中使用。当我运行应用程序时,即使我放置iCarousel的视图在UIViewController的主视图中具有尾部和前导空间,iCarousel项之间也没有空格。

有什么帮助吗?

objective-c uiview carousel ios icarousel

2
推荐指数
1
解决办法
1848
查看次数

在故事板上使用iCarousel框架

有没有人试图用故事板实现iCarousel?我有一个现有项目,但不确定这是否适用于Storyboard.有没有人成功完成此任务或提供任何指示,我需要在Storyboard项目中实现这一点?

objective-c storyboard ios icarousel

1
推荐指数
1
解决办法
4260
查看次数

隐藏的iCarousel项目反射效果

我有一个iCarousel库的应用程序.一切都很完美.但我需要没有反射的覆盖流.我该怎么解雇呢?日Thnx.

xcode coverflow ios icarousel

1
推荐指数
1
解决办法
871
查看次数

iCarousel配置任务

我使用iCarousel库,在我的屏幕上滚动许多UIViews.每个视图都填满整个屏幕.

我需要以某种方式配置iCarousel,只用短触摸滚动一个视图.

我现在有

carousel.scrollSpeed = 0.1;
Run Code Online (Sandbox Code Playgroud)

但是要从一个屏幕滚动到另一个屏幕,我需要将手指从一侧滑到另一侧.如果我将scrollSpeedparametr 设置为更高的值,许多UIViews滚动,但我需要配置为每次触摸只滚动一个UIView.

有谁能够帮我?

ios icarousel

1
推荐指数
1
解决办法
1581
查看次数

轮播非重复视图

我正在使用旋转木马.我将类型设置为iCarouselTypeRotary.我的问题是图像不断重复,即我只有4张图像.在最后一张图像之后,第一张图像重复并继续.我希望它像iCarouselTypeCoverFlow2类型一样停止.请帮忙.我不能使用任何其他类型.我希望这种风格仅适用于旋转木马.

提前致谢.

xcode scroll ios icarousel

1
推荐指数
1
解决办法
1014
查看次数

如何为 iCarousel 提供可访问的滑动操作

我正在尝试制作一个易于访问的应用程序。当我想使用iCarousel实现标准(三指向右或向左滑动)行为时,问题就出现了。由于 iCarousel 本身并不完全可访问,它只是让用户拥有难以处理的项目。

我做了一些研究,有一些解决方法,但我也不想实现UIAccessibilityCustomAction因为这不会给用户轻松滑动的能力。

ios voiceover icarousel uiaccessibility swift

1
推荐指数
1
解决办法
1346
查看次数

NSMutableArray最后一个Object

我正在尝试iCarousel,有一个函数可以删除视图的索引和数组的索引,

NSInteger index = carousel.currentItemIndex;
[carousel removeItemAtIndex:index animated:YES];
[imagesArray removeObjectAtIndex:index];
Run Code Online (Sandbox Code Playgroud)

我删除它直到剩下一个项目,然后如果剩下一个项目我想插入它的副本.我试过这个:

insertItemAtindex:carousel.currentItemIndex 但它正在插入最后一个视图.

但我想要的是在我的视图中插入carousel的/ imagesArray最后一个对象/索引.我该如何实现它,或者如何确定NSMutableArray在视图中留下的最后一个对象?

nsmutablearray ios icarousel

0
推荐指数
1
解决办法
6804
查看次数

[__NSArrayM objectAtIndex:]:索引2超出边界[0 .. 1]

我是一个新的iOS开发人员; 我有一个解析和动态单元格的应用程序,但当我运行应用程序时,我发现应用程序崩溃,因为标题上的原因我的代码如下

- (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index reusingView:(UIView *)view
{

    myArray = [[NSMutableArray alloc] init];


    //create new view if no view is available for recycling

   // view = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 250.0f, 300.0f)] autorelease];

    FXImageView *imageView = [[[FXImageView alloc] initWithFrame:CGRectMake(0, 0, 250.0f, 350.0f)] autorelease];
    imageView.contentMode = UIViewContentModeScaleAspectFit;
    imageView.asynchronous = YES;
   // imageView.reflectionScale = 0.5f;
   // imageView.reflectionAlpha = 0.25f;
  //  imageView.reflectionGap = 10.0f;
    imageView.shadowOffset = CGSizeMake(0.0f, 2.0f);
    imageView.shadowBlur = 5.0f;
    imageView.cornerRadius = 10.0f;
    view = imageView;

    [ProgressHUD dismiss];

     NSString *string1 …
Run Code Online (Sandbox Code Playgroud)

nsarray ios nsrangeexception icarousel uicollectionview

0
推荐指数
1
解决办法
1万
查看次数