Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

Commit 2ad0c52

Browse files
wqyfavorcxfeng1
authored andcommitted
[WEEX-559][iOS]Fix issue that handleAppear should be resent for lazily created scrollview. (#1420)
1 parent 0fa0610 commit 2ad0c52

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ typedef id (^WXDataBindingBlock)(NSDictionary *data, BOOL *needUpdate);
264264

265265
- (void)_detachSlotEvent:(NSDictionary *)data;
266266

267+
- (void)_buildViewHierarchyLazily;
268+
267269
@end
268270

269271

ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.mm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ - (void)viewDidLoad
229229

230230
- (void)layoutDidFinish
231231
{
232-
233-
234232
if ([self isViewLoaded]) {
235233
[self setContentSize:_contentSize];
236234
[self adjustSticky];
@@ -240,6 +238,12 @@ - (void)layoutDidFinish
240238
[_loadingComponent resizeFrame];
241239
}
242240

241+
- (void)_buildViewHierarchyLazily
242+
{
243+
[super _buildViewHierarchyLazily];
244+
[self handleAppear];
245+
}
246+
243247
- (void)viewWillUnload
244248
{
245249
((UIScrollView *)_view).delegate = nil;

0 commit comments

Comments
 (0)