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
- (void)setDelegate:(id)newDelegate
{
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:
- (void)setDelegate:(id)newDelegate
{
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.
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.