Giter VIP home page Giter VIP logo

Comments (2)

fydx avatar fydx commented on July 29, 2024

具体的复用问题,可以详细的说一下么?

复用id具体可以看 http://tangram.pingguohe.net/docs/ios/develop-component 里面 “关于复用标记Protocol TangramElementReuseIdentifierProtocol”的说明

from tangram-ios.

ruiboqian avatar ruiboqian commented on July 29, 2024

首先我遵循代理TangramElementReuseIdentifierProtocol ,返回了一个固定值,这样就可以了

+ (NSString *)reuseIdByModel:(TangramDefaultItemModel *)itemModel {
    
    return @"GoodsCellElement";
}

如果不设置代理的话,默认 reuseIdentifier 应该是返回 model.type。

我在自定义的Element中接收json参数时

@property (nonatomic, strong) NSString *goodName;
@property (nonatomic, strong) NSNumber *goodStar;

获取显示到 label 上时,NSString类型的能显示成功,而NSNumber的显示重用偶尔会有问题,我不知道有什么区别?

-----更新-----
我已经找到原因了,后台返回goodStar数据进行了设置,现在已经解决,谢谢!

from tangram-ios.

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.