-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dismiss view controller have STClollapseTableView causes error #15
Comments
I had the same when using UINavigationController and pushing it as a view. This fix works, but any ideas how would I go about changing this if I'm using CocoaPods, because as soon as I do a pod update, it will remove any changes I've made. |
Thanks. I have the problem yesterday. @phongnguyensg |
I have the same problem with my app crashing due to a runtime error in STCollapseTableView.m. This is my fix (pretty much the same as above):
I really hate editing code in a CocoaPod in case an update removes my fix. I'd appreciate if this fix could be incorporated into a the next release. Thanks. |
This is my modified: |
I'm embedded STCollapseTableView to a view controller to send it as modal to super view controller. But some thing wrong happens at: STCollapseTableView.h from line 95
{
if (newDelegate != self.collapseDelegate)
{
self.collapseDelegate = newDelegate;
[super setDelegate:self.collapseDelegate?self:nil];
}
}
When the modal view controller was dismissed. A new delegate send to this function as param and it's nil. The error cause at line 97 when trying to compare. I fix it like this:
{
if(!newDelegate){
return;
}
if (newDelegate != self.collapseDelegate)
{
self.collapseDelegate = newDelegate;
[super setDelegate:self.collapseDelegate?self:nil];
}
}
Check whether new delegate is nil and vice versa. Unless it's nil, move to next expression! You guys should check and fix it. It work well on independent view controller but issue only happened when embedded to a view controller and show it as modal.
The text was updated successfully, but these errors were encountered: