Skip to content

Commit

Permalink
delete unused RCTSurfaceHostingView selectors
Browse files Browse the repository at this point in the history
Differential Revision: D48140317

fbshipit-source-id: c9c91368693c0eccc75a2250eaf79981826754e8
  • Loading branch information
philIip authored and facebook-github-bot committed Aug 9, 2023
1 parent f62b41c commit ba4a447
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ NS_ASSUME_NONNULL_BEGIN
*/
@interface RCTSurfaceHostingView : UIView <RCTSurfaceDelegate>

/**
* Create an instance of RCTSurface to be hosted.
*/
+ (RCTSurface *)createSurfaceWithBridge:(RCTBridge *)bridge
moduleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initialProperties;

/**
* Designated initializer.
* Instantiates a view with given Surface object.
Expand All @@ -42,16 +35,6 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithSurface:(id<RCTSurfaceProtocol>)surface
sizeMeasureMode:(RCTSurfaceSizeMeasureMode)sizeMeasureMode NS_DESIGNATED_INITIALIZER;

/**
* Convenience initializer.
* Instantiates a Surface object with given `bridge`, `moduleName`, and
* `initialProperties`, and then use it to instantiate a view.
*/
- (instancetype)initWithBridge:(RCTBridge *)bridge
moduleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initialProperties
sizeMeasureMode:(RCTSurfaceSizeMeasureMode)sizeMeasureMode;

/**
* Surface object which is currently using to power the view.
* Read-only.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,10 @@ @implementation RCTSurfaceHostingView {
RCTSurfaceStage _stage;
}

+ (id<RCTSurfaceProtocol>)createSurfaceWithBridge:(RCTBridge *)bridge
moduleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initialProperties
{
return [[RCTSurface alloc] initWithBridge:bridge moduleName:moduleName initialProperties:initialProperties];
}

RCT_NOT_IMPLEMENTED(-(instancetype)init)
RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
RCT_NOT_IMPLEMENTED(-(nullable instancetype)initWithCoder : (NSCoder *)coder)

- (instancetype)initWithBridge:(RCTBridge *)bridge
moduleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initialProperties
sizeMeasureMode:(RCTSurfaceSizeMeasureMode)sizeMeasureMode
{
id<RCTSurfaceProtocol> surface = [[self class] createSurfaceWithBridge:bridge
moduleName:moduleName
initialProperties:initialProperties];
if (self = [self initWithSurface:surface sizeMeasureMode:sizeMeasureMode]) {
[surface start];
}
return self;
}

- (instancetype)initWithSurface:(id<RCTSurfaceProtocol>)surface
sizeMeasureMode:(RCTSurfaceSizeMeasureMode)sizeMeasureMode
{
Expand Down

0 comments on commit ba4a447

Please sign in to comment.