Files
flipper/iOS/Plugins/FlipperKitUIDebuggerPlugin/FlipperKitUIDebuggerPlugin/Descriptors/UIDUIViewControllerDescriptor.m
Lorenzo Blasa db7aa9eeaf OSS
Summary: Move UIDebugger plugin to OSS space.

Reviewed By: passy

Differential Revision: D47634848

fbshipit-source-id: 90e8c0181a2434d0e5d76bdb99b902051e6d702e
2023-07-21 04:47:13 -07:00

31 lines
691 B
Objective-C

/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#if FB_SONARKIT_ENABLED
#import "UIDUIViewControllerDescriptor.h"
@implementation UIDUIViewControllerDescriptor
- (NSArray<id<NSObject>>*)childrenOfNode:(UIViewController*)node {
if (node.view != nil) {
return [NSArray arrayWithObject:node.view];
}
return [NSArray array];
}
- (UIDBounds*)boundsForNode:(UIViewController*)node {
CGRect bounds = CGRectMake(
0, 0, node.view.bounds.size.width, node.view.bounds.size.height);
return [UIDBounds fromRect:bounds];
}
@end
#endif