objective-c - How to change block variables into global variables
巴扎黑
巴扎黑 2017-05-02 09:28:36
0
0
426

There is an external global variable self.array

dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);

dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
NSString *string=@"变量";

}
NSlog(@"%@",self.array); //self.array here is empty
How do I assign a value to self.array?

巴扎黑
巴扎黑

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template