I have a ViewController in which the user selects a map (custom UIButton) from a UIScrollView. I intercepted a touch event, selected a map and identified it, and then deleted it from the data source, but it still exists in UISubView. How can I get rid of it? Updating the view should show that it has been removed from the view. How to do it?
You can do this in one of two places:
you need to call the setNeedsDisplay function
[yourViewOutletVariable/viewParameter setNeedsDisplay];
[self setNeedsDisplay];
,
, .
, ?
ReactiveCocoa.
:
UIView *v = ...; [v removeFromSuperview];
setNeedsDisplay removeFromSuperview.
"UIViewController", :
[self viewDidLoad];