Only update Redbox when offscreen

This commit is contained in:
Nick Lockwood 2015-02-24 16:33:39 -08:00
parent f426ec8d7d
commit 46981fc258
1 changed files with 5 additions and 3 deletions

View File

@ -87,11 +87,13 @@
{
_lastStackTrace = stack;
_lastErrorMessage = message;
_cachedMessageCell = [self reuseCell:nil forErrorMessage:message];
[_stackTraceTableView reloadData];
[_stackTraceTableView setNeedsLayout];
if (self.hidden && shouldShow) {
_cachedMessageCell = [self reuseCell:nil forErrorMessage:message];
[_stackTraceTableView reloadData];
[_stackTraceTableView setNeedsLayout];
[_stackTraceTableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]
atScrollPosition:UITableViewScrollPositionTop
animated:NO];