Git Product home page Git Product logo

Comments (7)

jingliancui avatar jingliancui commented on May 28, 2024

你好!很高兴告诉你我可能知道了问题的所在。
问题在于如果在datasource放进两个view,就会有这个问题,不少于三张就没问题了。
希望作者能修复这个问题

from zybannerview.

zzyspace avatar zzyspace commented on May 28, 2024

不好意思前段时间较忙, 至今才回复. "在datasource放进两个view" 指的是什么意思呢? 如果有 Demo 可能会更好些.

from zybannerview.

jingliancui avatar jingliancui commented on May 28, 2024

在datasource放进两个view -> datasource集合内元素个数为2个

from zybannerview.

zzyspace avatar zzyspace commented on May 28, 2024

- (UIView *)banner:(ZYBannerView *)banner viewForItemAtIndex:(NSInteger)index 这个方法中 return 的 view 是使用集合持有的是吗

from zybannerview.

jingliancui avatar jingliancui commented on May 28, 2024
    public class CustomZYBannerViewDataSource : ZYBannerView.ZYBannerViewDataSource
    {
        private List<UIView> viewList;

        public CustomZYBannerViewDataSource(List<UIView> _viewList)
        {
            viewList = _viewList;
        }

        public override UIView Banner(ZYBannerView.ZYBannerView banner, nint index)
        {
            return viewList[(int)index];
        }

        public override nint NumberOfItemsInBanner(ZYBannerView.ZYBannerView banner)
        {
            return viewList.Count;
        }
    }

对的,我用的这种方式,以上代码的第二个函数应该就是你说的那个吧?
我在实例化对象的时候会通过构造函数把使用的集合传进来的。

from zybannerview.

lzcdgit avatar lzcdgit commented on May 28, 2024

两位还在么,我也遇到类似问题

from zybannerview.

jingliancui avatar jingliancui commented on May 28, 2024

@lzcdgit 或者你需要重现一下步骤给作者,我的项目已经停了好久了,所以已经忘记了相关bug的重现了。

from zybannerview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.