mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
Fixed ActivityIndicatorIOS layout
Summary: public This has been broken for a while. The styles in the JS were being set on the container instead of the activity view itself. Also, due to the way frames were set directly on layer properties instead of the view, resizing didn't work properly because the UIImageView inside the UIActivityView was not being realligned when the bounds changed. This also caused problems for other controls such as maps, where it was fixed with a method override, but the simpler solution is just to set the view center and bounds directly. Before: {F23631143} After: {F23631144} Reviewed By: javache, tadeuzagallo Differential Revision: D2575156 fb-gh-sync-id: e82e56d36648e7c924df77da1750e03037b5d5be
This commit is contained in:
parent
ed0b45ef8e
commit
b0b9a56ef8
@ -74,8 +74,8 @@ var ActivityIndicatorIOS = React.createClass({
|
||||
return (
|
||||
<View
|
||||
onLayout={onLayout}
|
||||
style={[styles.container, sizeStyle, style]}>
|
||||
<RCTActivityIndicatorView {...props} />
|
||||
style={[styles.container, style]}>
|
||||
<RCTActivityIndicatorView {...props} style={sizeStyle} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
@ -47,11 +47,6 @@ const CGFloat RCTMapZoomBoundBuffer = 0.01;
|
||||
[_regionChangeObserveTimer invalidate];
|
||||
}
|
||||
|
||||
- (void)reactSetFrame:(CGRect)frame
|
||||
{
|
||||
self.frame = frame;
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
[super layoutSubviews];
|
||||
|
@ -78,8 +78,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
self.layer.position = position;
|
||||
self.layer.bounds = bounds;
|
||||
self.center = position;
|
||||
self.bounds = bounds;
|
||||
}
|
||||
|
||||
- (void)reactSetInheritedBackgroundColor:(UIColor *)inheritedBackgroundColor
|
||||
|
Loading…
x
Reference in New Issue
Block a user