mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
iOS: proxy minimumSize to RCTSurface, but as a noop
Summary: Previously, RCTRootView added support for minimumSize as a workaround for some initial layout use cases. Going forward, we don't need this anymore. So let's add a proxy property but log an error if anyone calls it. Changelog: [iOS][Changed] - Proxy minimumSize to RCTSurface as a noop Reviewed By: JoshuaGross Differential Revision: D29284227 fbshipit-source-id: 98b2dfc905c6c7e1adc03216e3a1cc3fda0a4133
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fc9c326912
commit
fb58fa1734
@@ -35,6 +35,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic, assign) BOOL passThroughTouches;
|
||||
@property (nonatomic, assign) NSTimeInterval loadingViewFadeDelay;
|
||||
@property (nonatomic, assign) NSTimeInterval loadingViewFadeDuration;
|
||||
@property (nonatomic, assign) CGSize minimumSize;
|
||||
|
||||
- (instancetype)initWithBridge:(RCTBridge *)bridge
|
||||
moduleName:(NSString *)moduleName
|
||||
|
||||
@@ -61,6 +61,7 @@ static RCTRootViewSizeFlexibility convertToRootViewSizeFlexibility(RCTSurfaceSiz
|
||||
RCT_PROFILE_BEGIN_EVENT(RCTProfileTagAlways, @"-[RCTSurfaceHostingProxyRootView init]", nil);
|
||||
|
||||
_bridge = bridge;
|
||||
_minimumSize = CGSizeZero;
|
||||
|
||||
if (!bridge.isLoading) {
|
||||
[bridge.performanceLogger markStartForTag:RCTPLTTI];
|
||||
@@ -172,6 +173,15 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder)
|
||||
return _reactViewController ?: [super reactViewController];
|
||||
}
|
||||
|
||||
- (void)setMinimumSize:(CGSize)minimumSize
|
||||
{
|
||||
if (!CGSizeEqualToSize(minimumSize, CGSizeZero)) {
|
||||
// TODO (T93859532): Investigate implementation for this.
|
||||
RCTLogError(@"RCTSurfaceHostingProxyRootView does not support changing the deprecated minimumSize");
|
||||
}
|
||||
_minimumSize = CGSizeZero;
|
||||
}
|
||||
|
||||
#pragma mark unsupported
|
||||
|
||||
- (void)cancelTouches
|
||||
|
||||
Reference in New Issue
Block a user