我有一个应用程序可以在连拍模式下拍摄图像,但是一旦拍摄图像并即将进行预览,它就会崩溃并且错误显示“由于内存压力而终止的应用程序”
当用户按住相机按钮时,我需要拍摄更多数量的图像......离开按钮后,我需要将所有图像显示为幻灯片......我必须做什么?
我的代码是:
- (void)longPress:(UILongPressGestureRecognizer*)gesture {
if (gesture.state == UIGestureRecognizerStateBegan) {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(takePictures)
name:AVCaptureSessionDidStartRunningNotification object:nil];
}
else if (gesture.state == UIGestureRecognizerStateEnded)
{
}
-(void)takePictures
{
[imagePicker takePicture];
}
帮我..