I saw many threads related to this issue, but none addresses my case (I think).
My case should be simple, I have a Custom UIView
in my controller, from my c
I think the correct way to use it is:
[self setNeedsDisplay:YES];
Although I always have problems to get that working :(
After alot of testing, I saw something related to threads and the fact setNeedsDisplay should only be called in the mainThread...besides I never started a separeted thread in this classes, the class that raised the Notification was in a secondary thread...and aparently this was causing the issue...
to Solve it I just forced setNeedsDisplay to be called in the main thread..
dispatch_async(dispatch_get_main_queue(), ^{
[self setNeedsDisplay];
});
Swift 3:
DispatchQueue.main.async { [weak self] in
self?.setNeedsDisplay()
}