iOS:fix Scroller
This commit is contained in:
@@ -69,16 +69,20 @@ - (instancetype)init {
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)apply {
|
||||
- (void)apply:(CGSize)frameSize {
|
||||
if (!CGAffineTransformEqualToTransform(self.view.transform, CGAffineTransformIdentity)) {
|
||||
return;
|
||||
}
|
||||
self.resolved = NO;
|
||||
[self measure:self.view.frame.size];
|
||||
[self measure:frameSize];
|
||||
[self layout];
|
||||
[self setFrame];
|
||||
}
|
||||
|
||||
- (void)apply {
|
||||
[self apply:self.view.frame.size];
|
||||
}
|
||||
|
||||
- (void)measure:(CGSize)targetSize {
|
||||
if (self.widthSpec == DoricLayoutMost) {
|
||||
self.measuredWidth = targetSize.width;
|
||||
@@ -433,7 +437,7 @@ - (void)layoutHLayout {
|
||||
if ((gravity & DoricGravityTop) == DoricGravityTop) {
|
||||
layout.measuredY = self.paddingTop;
|
||||
} else if ((gravity & DoricGravityBottom) == DoricGravityBottom) {
|
||||
layout.measuredY = self.measuredHeight - self.paddingBottom - child.height;
|
||||
layout.measuredY = self.measuredHeight - self.paddingBottom - layout.measuredHeight;
|
||||
} else if ((gravity & DoricGravityCenterY) == DoricGravityCenterY) {
|
||||
layout.measuredY = self.measuredHeight / 2 - layout.measuredHeight / 2;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user