我有一个ECSSlidingViewController,在underLeftViewController中有一个菜单,它有一些不同的按钮,这些按钮导致不同的segue在ECSSlidingViewController.topViewController中显示不同的UIViewControllers。菜单上的所有按钮都运行良好,并且可以转到相应的视图控制器。
但是,我希望能够从ECSSlidingViewController.underLeftViewController以外的其他UIViewController执行其中一个segue,每当我尝试这样做时,我都会收到EXC_BAD_ACCESS(1)错误。在我的日志中显示以下信息。
警告:尝试从视图控制器中解除:0xc061250>正在进行演示或解雇!
2014-02-08 23:36:51.772 andrew [19995:70b] * - [ECDynamicTransition retain]:消息发送到解除分配的实例0x11a32710
- (CGRect)frameFromDelegateForViewController:(UIViewController *)viewController
topViewPosition:(ECSlidingViewControllerTopViewPosition)topViewPosition {
CGRect frame = CGRectInfinite;
NSObject *testSelf = self;
NSObject *testSelfDelegate = self.delegate; //This is where EXC_BAD_ACCESS(1) occurs
if ([(NSObject *)self.delegate respondsToSelector:@selector(slidingViewController:layoutControllerForTopViewPosition:)]) {
id<ECSlidingViewControllerLayout> layoutController = [self.delegate slidingViewController:self
layoutControllerForTopViewPosition:topViewPosition];
if (layoutController) {
frame = [layoutController slidingViewController:self
frameForViewController:viewController
topViewPosition:topViewPosition];
}
}
return frame;
}