线程1:exc_bad_access错误 – 编程模态视图

我一直试图让模态视图显示透明背景 – 我已经通过@Tommaso Resti 模式查看透明背景进行编程式pipe理- 停止低层隐藏?

在以编程方式实现模式视图之前,我通过一个segue连接了模式(它有一个shareScreenViewController类),它包含了button,它的.m文件中的方法使用了ibconnections。 这个方法没有问题,而是用segue连接 – 但是现在当我点击一个button的时候,这个视图被编程添加了,这个应用程序崩溃了,

Thread1:Exc_Bad_Access(code=1... 

在下面的屏幕截图中显示 – 我添加了断点,看起来该方法甚至不应该在应用程序崩溃之前调用 – 不知道发生了什么事情 – 任何人都可以提供任何build议!?

在这里输入图像说明

更新:从@Larme的帮助下面我启用NSZombie,现在得到这个错误 –

GetFit [1574:60b]animation完成2013-11-15 15:04:39.419 GetPTFit [1574:60b] *** – [shareScreenViewController performSelector:withObject:withObject:]:发送的讯息解除分配实例0x16e1f2d0(lldb)

我用来设置模式的代码如下 –

 - (IBAction)shareBtn:(id)sender { UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle: nil]; UIViewController *myModalController = [mainStoryboard instantiateViewControllerWithIdentifier:@"shareScreenViewController"]; [myModalController.view setFrame: CGRectMake(0, [UIScreen mainScreen].bounds.size.height, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)]; [self.view addSubview: myModalController.view]; /* UPDATED HERE! */ /* Animate it from the bottom */ [UIView animateWithDuration:.5 animations:^{ CGAffineTransform move = CGAffineTransformMakeTranslation(0, -[UIScreen mainScreen].bounds.size.height); [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; myModalController.view.transform = move; /* UPDATED HERE */ } completion:^(BOOL finished) { if(finished) { NSLog(@"Animation completed"); } }]; 

}