mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-19 21:45:10 +00:00
feat: add macos CI (#1704)
PR adding macOS configuration to Example app and adding CI job for building the app on macOS.
This commit is contained in:
22
Example/macos/Example-macOS/ViewController.m
Normal file
22
Example/macos/Example-macOS/ViewController.m
Normal file
@@ -0,0 +1,22 @@
|
||||
#import "ViewController.h"
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#import <React/RCTRootView.h>
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
RCTBridge *bridge = [((AppDelegate *)[NSApp delegate])bridge];
|
||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"Example" initialProperties:nil];
|
||||
|
||||
NSView *view = [self view];
|
||||
|
||||
[view addSubview:rootView];
|
||||
[rootView setBackgroundColor:[NSColor windowBackgroundColor]];
|
||||
[rootView setFrame:[view bounds]];
|
||||
[rootView setAutoresizingMask:(NSViewMinXMargin | NSViewMinXMargin | NSViewMinYMargin | NSViewMaxYMargin | NSViewWidthSizable | NSViewHeightSizable)];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user