Code Monkey home page Code Monkey logo

Comments (6)

unash avatar unash commented on July 19, 2024

#17

from barragerenderer.

gank0326 avatar gank0326 commented on July 19, 2024

BarrageWalkDirectionR2L BarrageFloatDirectionB2T 同时设置这两个?我现在需要从又往左出来,先出来的要在最下面显示。

from barragerenderer.

gank0326 avatar gank0326 commented on July 19, 2024

#import "BarrageWalkSprite.h"

@interface BarrageWalkELBarrageViewSprite : BarrageWalkSprite

@EnD

#import "BarrageWalkELBarrageViewSprite.h"
#import "ELBarrageView.h"
#import "ELBarrageModel.h"

@implementation BarrageWalkELBarrageViewSprite

@synthesize model = _model;

  • (instancetype)init
    {
    if (self = [super init]) {
    _model = nil;
    }
    return self;
    }

#pragma mark - launch

  • (UIView *)bindingView
    {
    ELBarrageView *barrageView = [[ELBarrageView alloc] initWithFrame:CGRectMake(0, 0, 375, 36)];
    [barrageView fillWithBarrage:_model];
    return barrageView;
    }

@EnD

我继承你的写了一个Sprite,我把bindview 宽度设的足够大,还是会出现重叠

from barragerenderer.

unash avatar unash commented on July 19, 2024

『BarrageWalkDirectionR2L BarrageFloatDirectionB2T 同时设置这两个?我现在需要从又往左出来,先出来的要在最下面显示。』这个是不支持的。

from barragerenderer.

unash avatar unash commented on July 19, 2024

『(UIView *)bindingView { ELBarrageView *barrageView = [[ELBarrageView alloc] initWithFrame:CGRectMake(0, 0, 375, 36)]; [barrageView fillWithBarrage:_model]; return barrageView; }』
在bindingView里设置frame不起作用,需要在你的ELBarrageView里面实现 sizeThatFits方法返回ELBarrageView真实的大小。比如返回(375, 36)。

from barragerenderer.

gank0326 avatar gank0326 commented on July 19, 2024

『(UIView *)bindingView { ELBarrageView *barrageView = [[ELBarrageView alloc] initWithFrame:CGRectMake(0, 0, 375, 36)]; [barrageView fillWithBarrage:_model]; return barrageView; }』
在bindingView里设置frame不起作用,需要在你的ELBarrageView里面实现 sizeThatFits方法返回ELBarrageView真实的大小。比如返回(375, 36)。

写在sizeThatFits这边会很卡

from barragerenderer.

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.