Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [MBProgressHUD showHUDAddedTo:self.view animated:YES];
- [MBProgressHUD hideHUDForView:self.view animated:YES];
- [MBProgressHUD showHUDAddedTo:self.view animated:YES];
- dispatch_queue_t myqueue = dispatch_queue_create("queue", NULL);
- dispatch_async(myqueue, ^{
- [self performSelectorOnMainThread:@selector(fetchedData:) withObject:nil waitUntilDone:YES];
- dispatch_async(dispatch_get_main_queue(), ^{
- [self.tbl reloadData];
- [MBProgressHUD hideHUDForView:self.view animated:YES];
- });
- });
- [MBProgressHUD showHUDAddedTo:self.view animated:YES];
- dispatch_queue_t myqueue = dispatch_queue_create("queue", NULL);
- dispatch_async(myqueue, ^{
- //Whatever is happening in the fetchedData method will now happen in the background
- [self fetchedData:nil];
- dispatch_async(dispatch_get_main_queue(), ^{
- [self.tbl reloadData];
- [MBProgressHUD hideHUDForView:self.view animated:YES];
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement