Is there a way to refresh a UIView which will subsequently call drawRect?
EDIT:
I am doing [view setNeedsDisplay]
however it doesn't appear to be working! Or at least my NSLog in drawRect isn't displaying.
EDIT2:
Please see comments of selected answer for the gory details! Number one tip: Make sure it's property linked!
Yes! Just call
[self.view setNeedsDisplay];
from your view controller, or [self setNeedsDisplay]
directly from UIView
, if you're using a subclass.
EDIT: make sure you're calling this on the correct view
. The code above will call the view
property of the view controller you're calling it from; this isn't necessarily correct, though it depends on your needs.
Also, make sure that the outlet is connected in Interface Builder, if you're creating this view in a nib file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With