Commit f3383187 authored by _Finder丶Tiwk's avatar _Finder丶Tiwk

#Fix: FLBFlutterViewContainter通过xib/storyboard初始化时,显示错乱问题

parent 29531c8a
......@@ -86,15 +86,31 @@ static NSUInteger kInstanceCounter = 0;
return @(_identifier).stringValue;
}
- (void)_setup
{
static long long sCounter = 0;
_identifier = sCounter++;
[self.class instanceCounterIncrease];
SEL sel = @selector(flutterViewDidShow:);
NSString *notiName = @"flutter_boost_container_showed";
[NSNotificationCenter.defaultCenter addObserver:self
selector:sel
name:notiName
object:nil];
}
- (instancetype)init
{
if(self = [super init]){
static long long sCounter = 0;
_identifier = sCounter++;
[self.class instanceCounterIncrease];
[NSNotificationCenter.defaultCenter addObserver:self
selector:@selector(flutterViewDidShow:) name:@"flutter_boost_container_showed"
object:nil];
[self _setup];
}
return self;
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder{
if (self = [super initWithCoder: aDecoder]) {
[self _setup];
}
return self;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment