How Can i Call
-(void)drawRect:(CGRect)rect
in https://github.com/stkim1/MTImageMapView/blob/master/MTImageMapView/MTImageMapView.m
From Another UiViewController
Periodically With NSTimer
How Can i Call
-(void)drawRect:(CGRect)rect
in https://github.com/stkim1/MTImageMapView/blob/master/MTImageMapView/MTImageMapView.m
From Another UiViewController
Periodically With NSTimer
From the documentation:
Discussion
The default implementation of this method does nothing. Subclasses that use technologies such as Core Graphics and UIKit to draw their view’s content should override this method and implement their drawing code there. You do not need to override this method if your view sets its content in other ways. For example, you do not need to override this method if your view just displays a background color or if your view sets its content directly using the underlying layer object.
...
If you subclass
UIView
directly, your implementation of this method does not need to call super. However, if you are subclassing a different view class, you should call super at some point in your implementation.This method is called when a view is first displayed or when an event occurs that invalidates a visible part of the view. You should never call this method directly yourself. To invalidate part of your view, and thus cause that portion to be redrawn, call the
setNeedsDisplay
orsetNeedsDisplayInRect:
method instead.
YES i Found The solution i am calling a function with timer at the End of a drawrect
function and calling setNeedsDisplay()
in it