Created
July 29, 2016 13:51
-
-
Save mavris/f78db51599a72f55357dedf98a7ad396 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment