samvermette / SVPullToRefresh

Give pull-to-refresh & infinite scrolling to any UIScrollView with 1 line of code.
http://samvermette.com/314
MIT License
4.82k stars 1.09k forks source link

SVPullToRefresh cause a crash #247

Closed FrankCYQ closed 9 years ago

FrankCYQ commented 9 years ago

[(UITableView/UIScrollView)WrapperView _systemGestureStateChanged:]: message sent to deallocated instance xxx

i add the SVPullToRefresh's files to my project , then i (present/push) a tableviewController or have anyone subview of uiscrollview's UIViewController (ctA) ,ctA don't need use SVPullToRefresh stuff , but when i (dismiss/pop) ctA , this moment trigger ctA's dealloc method, then it cause the subview of uiscrollview dealloc, after that ,ur application will crash when u touch anywhere on the screen, the error information is [UITableView/UIScrollView WrapperView _systemGestureStateChanged:]: message sent to deallocated instance xxx, i have no idea what to do ,i do nothing with the original files of SVPullToRefresh, i tested this situation using swift and object-c , just got the same error.
Is there anyone could help me to solve this problem, i'm waiting for ur help, thanks

FrankCYQ commented 9 years ago

i made a mistake, wrote the dealloc method at the "UIScrollView+SVInfiniteScrolling.m" and "UIScrollView+SVPullToRefresh.m" ,then i got the crash info . maybe we should never do this at a category implement file

hynever commented 9 years ago

thankss, i met the same problem too,but why?

FrankCYQ commented 9 years ago

when i have time ,i'll find the answer