Skip to content
This repository was archived by the owner on Oct 19, 2025. It is now read-only.
This repository was archived by the owner on Oct 19, 2025. It is now read-only.

LazyScrollView的subView起点坐标问题 #17

@angel-cry

Description

@angel-cry

子视图的起点坐标为何不是从左上角开始算的?如下self.lazyScroll是LazyScrollView,因为设置过setTranslucent和edgesForExtendedLayout,它的起点坐标是从从导航栏左上角开始计算的,但是加在LazyScrollView上的子视图的起点坐标,为何不是从LazyScrollView的左上角开始计算的?

// view
[self.view addSubview:self.lazyScroll];

// frame
[self.lazyScroll mas_makeConstraints:^(MASConstraintMaker *make) {
    make.top.left.right.mas_equalTo(self.view);
    make.bottom.mas_equalTo(self.view.mas_bottom);

}];

 // Here is frame array for subView.
 // LazyScrollView must know item view's frame before rending.
 CGFloat maxY = 0, currentY = 0 - APP_NavHeight;
 CGFloat viewWidth = CGRectGetWidth(self.view.bounds);
 [self addRect:CGRectMake(0, 0 + currentY, viewWidth , 200) andUpdateMaxY:&maxY];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions