Crash on EXC_Breakpoint Scroll View

前端 未结 3 768
误落风尘
误落风尘 2021-02-19 15:39

This is a new problem I have been having ever since I\'ve been updating my app for iOS 7. Everytime I launch the app on my device or simulator, I get this error code

Re

相关标签:
3条回答
  • 2021-02-19 15:41

    Another (inelegant, imo) solution is to set your table's delegate to nil on dealloc:

    - (void)dealloc {
        [_tableView setDelegate:nil];
    }
    

    Seems to be a bug, but I can't guarantee. I am still looking for a reasonable explanation for that.

    Note: that probably applies for any UIScrollView subclass, not only UITableView.

    0 讨论(0)
  • 2021-02-19 15:51

    or if you watching for table view scrolling

    - (void)viewWillDisappear:(BOOL)animated
    {
        _table.delegate = nil;
    }
    

    Anyway its strange to call notification or something like that on dealloc enter image description here

    0 讨论(0)
  • 2021-02-19 15:53

    I was facing the exact situation. I enabled NSZombie, gave me the exact same error in ios7.

    In viewDidLoad

    [self setEdgesForExtendedLayout:UIRectEdgeNone];
    

    Solved my crash. You can also try from storyboard unselect the Extended Edges >> Under top bars.

    see the answer here https://stackoverflow.com/a/18892358/1378447

    N.B. It is still a mystery to me why 'scrollViewDidScroll' delegate method is being called even after dealloc.

    0 讨论(0)
提交回复
热议问题