feat:iOS LinearLayout and adapt new layoutconfig
This commit is contained in:
@@ -13,21 +13,26 @@
|
||||
#import "DoricNativePlugin.h"
|
||||
#import "DoricRootNode.h"
|
||||
#import "DoricLocalServer.h"
|
||||
#import "DoricLinearLayout.h"
|
||||
#import "DoricExtensions.h"
|
||||
|
||||
@interface ViewController ()
|
||||
@property (nonatomic,strong) DoricContext *doricContext;
|
||||
@property (nonatomic,strong) DoricLocalServer *localServer;
|
||||
@property(nonatomic, strong) DoricContext *doricContext;
|
||||
@property(nonatomic, strong) DoricLocalServer *localServer;
|
||||
@end
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
|
||||
NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"Snake" ofType:@"js"];
|
||||
NSString *jsContent = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
|
||||
self.doricContext = [[DoricContext alloc] initWithScript:jsContent source:@"test.js"];
|
||||
self.doricContext.rootNode.view = self.view;
|
||||
[self.doricContext.rootNode setupRootView:[[Stack new] also:^(Stack *it) {
|
||||
it.layoutConfig = [[StackLayoutConfig alloc] initWithWidth:LayoutParamAtMost height:LayoutParamAtMost];
|
||||
[self.view addSubview:it];
|
||||
}]];
|
||||
[self.doricContext initContextWithWidth:self.view.width height:self.view.height];
|
||||
[self.doricContext.driver connectDevKit:@"ws://192.168.11.38:7777"];
|
||||
self.localServer = [[DoricLocalServer alloc] init];
|
||||
|
@@ -25,7 +25,7 @@ EXTERNAL SOURCES:
|
||||
:path: "../"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Doric: 1dae6e8a19a32a27af975f787509cc0658dde095
|
||||
Doric: f96b77d435e836e88cf02319e3c9ebc08cab65f6
|
||||
GCDWebServer: ead88cd14596dd4eae4f5830b8877c87c8728990
|
||||
SDWebImage: 920f1a2ff1ca8296ad34f6e0510a1ef1d70ac965
|
||||
SocketRocket: d57c7159b83c3c6655745cd15302aa24b6bae531
|
||||
|
Reference in New Issue
Block a user