File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
example/ios/RenderLynxExample.xcodeproj Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 380380 "-DFOLLY_CFG_NO_COROUTINES=1",
381381 "-DFOLLY_HAVE_CLOCK_GETTIME=1",
382382 );
383- OTHER_LDFLAGS = "$(inherited) ";
383+ OTHER_LDFLAGS = (
384+ "$(inherited)",
385+ " ",
386+ );
384387 REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
385388 SDKROOT = iphoneos;
386389 SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
449452 "-DFOLLY_CFG_NO_COROUTINES=1",
450453 "-DFOLLY_HAVE_CLOCK_GETTIME=1",
451454 );
452- OTHER_LDFLAGS = "$(inherited) ";
455+ OTHER_LDFLAGS = (
456+ "$(inherited)",
457+ " ",
458+ );
453459 REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
454460 SDKROOT = iphoneos;
455461 USE_HERMES = true;
Original file line number Diff line number Diff line change @@ -34,8 +34,6 @@ - (instancetype)initWithFrame:(CGRect)frame
3434 _view = [[LynxView alloc ] initWithBuilderBlock: ^(LynxViewBuilder *builder) {
3535 builder.config = [[LynxConfig alloc ] initWithProvider: [[RenderLynxTemplateProvider alloc ] init ]];
3636 }];
37- _view.preferredLayoutWidth = 300 ;
38- _view.preferredLayoutHeight = 700 ;
3937 _view.layoutWidthMode = LynxViewSizeModeExact;
4038 _view.layoutHeightMode = LynxViewSizeModeExact;
4139
@@ -45,6 +43,15 @@ - (instancetype)initWithFrame:(CGRect)frame
4543 return self;
4644}
4745
46+ - (void )layoutSubviews {
47+ [super layoutSubviews ];
48+
49+ _view.preferredLayoutWidth = self.frame .size .width ;
50+ _view.preferredLayoutHeight = self.frame .size .height ;
51+
52+ [_view triggerLayout ];
53+ }
54+
4855- (void )updateProps : (Props::Shared const &)props oldProps : (Props::Shared const &)oldProps
4956{
5057 const auto &oldViewProps = *std::static_pointer_cast<RenderLynxViewProps const >(_props);
You can’t perform that action at this time.
0 commit comments