This is as simple as:
[self.myActivityIndicator startAnimating];
[doc openWithCompletionHandler:^(BOOL success) {
[self.myActivityIndicator stopAnimating];
if(success)
{
self.txtView.text = self.doc.noteContent;
}
else
{
NSLog(@"Error");
}
}];