hello i created a nsnotificationcenter in appdelegate.when the download is finished it sends a notification. i have a activity indicator on my class and i what to hide it when the download is finished but it doesn’t work. i can see my nslog but it doesn’t hide the acitivyindicator.
here is my code:
viewdidload:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshView:) name:@"loadingFinished" object:nil];
my function:
-(void)refreshView:(NSNotification*)notification
{
activity.hidden = YES;
self.view.userInteractionEnabled =YES;
NSLog(@"alles geladen zeiger wird geladen");
}
if you are at any other thread, then it will not work cz UI not work in inner thread. use this