File tree Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -86,15 +86,31 @@ - (NSString *)uniqueIDString
8686 return @(_identifier).stringValue ;
8787}
8888
89+ - (void )_setup
90+ {
91+ static long long sCounter = 0 ;
92+ _identifier = sCounter ++;
93+ [self .class instanceCounterIncrease ];
94+
95+ SEL sel = @selector (flutterViewDidShow: );
96+ NSString *notiName = @" flutter_boost_container_showed" ;
97+ [NSNotificationCenter .defaultCenter addObserver: self
98+ selector: sel
99+ name: notiName
100+ object: nil ];
101+ }
102+
89103- (instancetype )init
90104{
91105 if (self = [super init ]){
92- static long long sCounter = 0 ;
93- _identifier = sCounter ++;
94- [self .class instanceCounterIncrease ];
95- [NSNotificationCenter .defaultCenter addObserver: self
96- selector: @selector (flutterViewDidShow: ) name: @" flutter_boost_container_showed"
97- object: nil ];
106+ [self _setup ];
107+ }
108+ return self;
109+ }
110+
111+ - (instancetype )initWithCoder : (NSCoder *)aDecoder {
112+ if (self = [super initWithCoder: aDecoder]) {
113+ [self _setup ];
98114 }
99115 return self;
100116}
You can’t perform that action at this time.
0 commit comments