add macOS descriptors for layout plugin
Summary: Add macOS only descriptors. Currently does not support Yoga/YogaKit or accessibility features; will add those in a later diff. Reviewed By: priteshrnandgaonkar Differential Revision: D27332601 fbshipit-source-id: 35c93cf715f004dbf8dbf8753534f1d4f9801b4c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7c44d4d4f0
commit
ed69c4f16a
@@ -70,8 +70,12 @@ NSObject* flattenLayoutEditorMessage(NSObject* field);
|
||||
_connection = connection;
|
||||
|
||||
if (!_rootNode) {
|
||||
// TODO: T61384369 get rid off this if condition.
|
||||
// TODO: T61384369 get rid off this if condition.
|
||||
#if TARGET_OS_IPHONE
|
||||
_rootNode = [UIApplication sharedApplication];
|
||||
#elif TARGET_OS_OSX
|
||||
_rootNode = [NSApplication sharedApplication];
|
||||
#endif
|
||||
}
|
||||
|
||||
[SKInvalidation enableInvalidations];
|
||||
@@ -366,7 +370,11 @@ NSObject* flattenLayoutEditorMessage(NSObject* field) {
|
||||
- (void)onCallSetSearchActive:(BOOL)active
|
||||
withConnection:(id<FlipperConnection>)connection {
|
||||
if (active) {
|
||||
#if TARGET_OS_IPHONE
|
||||
[_tapListener mountWithFrame:[[UIScreen mainScreen] bounds]];
|
||||
#elif TARGET_OS_OSX
|
||||
[_tapListener mountWithFrame:NSRectToCGRect([NSScreen mainScreen].frame)];
|
||||
#endif
|
||||
__block id<NSObject> rootNode = _rootNode;
|
||||
|
||||
[_tapListener listenForTapWithBlock:^(CGPoint touchPoint) {
|
||||
|
||||
Reference in New Issue
Block a user