Reputation: 8977
I have a subclass of UIView in which it has a drawRect in it. It basically draws a line and an image. I have drawn this in viewDidLoad, but need to change the layout when the view changes to landscape. How can I redraw this?
Upvotes: 0
Views: 426
Reputation: 23722
Set the view's contentMode
to UIViewContentModeRedraw
. The view will call [self setNeedsDisplay]
whenever its bounds change. You will only have to resize the view as needed.
Upvotes: 6