20170112meetbug

Jan 12, 2017

记一个比较逗比的bug。
由于使用ASDK,在里面使用
create a displayNode and return a block uiview:

self.progressView = [[SHRecordProgressView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 8)]; self.progressView.backgroundColor = RGBA(245, 245, 245, 0.6); self.progressNode = [[ASDisplayNode alloc]initWithViewBlock:^UIView * _Nonnull{ @strongify(self); return self.progressView; }];

progressView create views when user interactor with device,
I change the one of the “views”‘s width,
effect that come:progressView
-(void)layoutSubviews{ [super layoutSubviews]; NSLog(@"%@",self); }

infinite log :round_pushpin:-[SHRecordProgressView layoutSubviews] + 31:balloon: self = <SHRecordProgressView: 0x1807afd0; frame = (0 342; 320 8); layer = <CALayer: 0x180f0080>>
:round_pushpin:-[SHRecordProgressView layoutSubviews] + 31:balloon: self = <SHRecordProgressView: 0x1807afd0; frame = (0 342; 320 8); layer = <CALayer: 0x180f0080>>
:round_pushpin:-[SHRecordProgressView layoutSubviews] + 31:balloon: self = <SHRecordProgressView: 0x1807afd0; frame = (0 342; 320 8); layer = <CALayer: 0x180f0080>>
:round_pushpin:-[SHRecordProgressView layoutSubviews] + 31:balloon: self = <SHRecordProgressView: 0x1807afd0; frame = (0 342; 320 8); layer = <CALayer: 0x180f0080>>
:round_pushpin:-[SHRecordProgressView layoutSubviews] + 31:balloon: self = <SHRecordProgressView: 0x1807afd0; frame = (0 342; 320 8); layer = <CALayer: 0x180f0080>>
:round_pushpin:-[SHRecordProgressView layoutSubviews] + 31:balloon: self = <SHRecordProgressView: 0x1807afd0; frame = (0 342; 320 8); layer = <CALayer: 0x180f0080>>
:round_pushpin:-[SHRecordProgressView layoutSubviews] + 31:balloon: self = <SHRecordProgressView: 0x1807afd0; frame = (0 342; 320 8); layer = <CALayer: 0x180f0080>>
:round_pushpin:-[SHRecordProgressView layoutSubviews] + 31:balloon: self = <SHRecordProgressView: 0x1807afd0; frame = (0 342; 320 8); layer = <CALayer: 0x180f0080>>
:round_pushpin:-[SHRecordProgressView layoutSubviews] + 31:balloon: self = <SHRecordProgressView: 0x1807afd0; frame = (0 342; 320 8); layer = <CALayer: 0x180f0080>>
:round_pushpin:-[SHRecordProgressView layoutSubviews] + 31:balloon: self = <SHRecordProgressView: 0x1807afd0; frame = (0 342; 320 8); layer = <CALayer: 0x180f0080>>
:round_pushpin:-[SHRecordProgressView layoutSubviews] + 31:balloon: self = <SHRecordProgressView: 0x1807afd0
what does it mean??help:joy:

akerdi [3:48 PM]
I figure it out,I use FBShimmerView add to the progressView, subViews not inside of shimmerView will disappeare:joy:I am not use to ShimmerView

我使用ASDK,每当我改变progressView中某个subView的Width,程序便一直进入layoutSubViews,同时所有其他的progressView的subViews都不见了,关键是不见了。
我以为是ASDK哪里引发的。
最后注释掉了FBShimmerView,才发现问题跟他有关。
progressView addSubView:FBShimmerView
当ShimmerView的contentView大小被我改成和progressView中subViews的最后一个时,除了rect里面View,其他的都不见了。没搞懂FBShimmer的思想,确实不好找问题啊。