We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UIView *root = [[UIView alloc] initWithFrame:self.bounds]; root.backgroundColor = [UIColor yellowColor]; [self.contentView addSubview:root]; MyBaseLayout *root = [[MyBaseLayout alloc] initWithFrame:self.bounds]; root.backgroundColor = [UIColor yellowColor]; [self.contentView addSubview:root]; 第一个view的宽度是32.8333 第二个直接就是33,这差别有点大啊
The text was updated successfully, but these errors were encountered:
MyLayout内部对尺寸进行了优化处理,也就是保证了设置的逻辑尺寸会有效的转化为物理像素。就如32.8333这个逻辑点经过特殊处理后就形成了33这个实际有效的值。另外看您代码中用的是一个MyBaseLayout。理论中我们是不支持在实际代码中直接使用MyBaseLayout的,而是其派生类。
Sorry, something went wrong.
flowLayout.itemSize = CGSizeMake((screenW-20) / 12, 35); UICollectionView 这样写的时候,个别cell之间会有间隙,但是用frame布局的话,就没有这个问题,
具体明细请加 qq 群:178573773 进行详细讨论吧。
No branches or pull requests
The text was updated successfully, but these errors were encountered: