Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- self.proArray = [[NSMutableArray alloc]init];
- GCDVC2* __weak weakSelf = self;
- self.postGCDBlock = ^{
- GCDVC2* __strong strongSelf = weakSelf;
- [strongSelf.proArray removeObject:@"3"];
- NSLog(@"%@",strongSelf.proArray);
- [strongSelf.activityIndicator stopAnimating];
- };
- self.addObjectsBlock = ^{
- GCDVC2* __strong strongSelf = weakSelf;
- [strongSelf.proArray addObject:@"2"];
- [NSThread sleepForTimeInterval:10];
- dispatch_async(dispatch_get_main_queue(),strongSelf.postGCDBlock);
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement