You should call refreshNowShowingMoviesList:nil
(note the nil
parameter). Then it won't crash, because you can call anything on nil objects. But it seems like you are calling refreshNowShowingMoviesList:self
. This results in endRefreshing
call on MasterViewController
, which is not available.
Or even easier/better, check the class before calling:
if([sender respondsToSelector:@selector(endRefreshing)]) {
[(UIRefreshControl *)sender endRefreshing];
}
Or just use properties instead of the sender argument. Smth. like self.tableView.refreshControl
...