다음 시나리오가 있습니다. MWPhotoBrowser를 사용 중입니다. 나는 그것을 한 번 잘 살릴 수있다. 내가 그것을 밀어하려고 두 번째로 도움이 아무것도 응용 프로그램이 충돌합니다. 이 프로젝트는 ARC 프로젝트이며이 코드는 이전 버전의 앱에서 올바르게 작동합니다. 나는 어리 석다.보기 컨트롤러를 밀면 응용 프로그램이 충돌 함
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
selectedIndexPath = indexPath;
if(browser == nil)
{
browser = [[MWPhotoBrowser alloc] initWithDelegate:self];
}
// Set options
browser.displayActionButton = YES; // Show action button to allow sharing, copying, etc (defaults to YES)
browser.displayNavArrows = YES; // Whether to display left and right nav arrows on toolbar (defaults to NO)
browser.zoomPhotosToFill = NO; // Images that almost fill the screen will be initially zoomed to fill (defaults to YES)
[browser setCurrentPhotoIndex:indexPath.row]; // Example: allows second image to be presented first
//browser.wantsFullScreenLayout = YES; // iOS 5 & 6 only: Decide if you want the photo browser full screen, i.e. whether the status bar is affected (defaults to YES)
// Present
[self.navigationController pushViewController:browser animated:YES];
}
MWPhotoBrowser가 잘 열리면 셀을 한 번 누릅니다. 다시 가서 다시 셀을 누릅니다 응용 프로그램은 디버거하지만 호출 스택 또는 오류 이유 충돌 :
(lldb):
브라우저가 강한 멤버 변수입니다. 그것은 조기에 할당 해제되지 않습니다. 메서드의 마지막 줄에 정확히 충돌하는 것을 보장 할 수도 있습니다.
누군가 내게 이것을 밝힐 수 있습니까? 응용 프로그램이 적어도 내게 충돌에 대한 이유를 주었고 디버거를 내 얼굴에 던지면 해결할 수 있습니다.
어디에서 충돌이 발생합니까? 오류가 무엇입니까? 필요한 경우 http://raywenderlich.com/10209/my-app-crashed-now-what-part-1을 참조하십시오. – rmaddy
디버거에 명령을 입력해야합니다. [more info] (http://lldb.llvm.org/tutorial.html) 역 추적을 위해'bt'로 시작할 것입니다. –
@rmaddy : 내가 질문의 설명에서 말했듯이, 메서드의 마지막 줄에서 충돌이 발생했으며, 충돌에 대한 이유를 제공하지 않고 단지 디버거 만 제공한다고 설명했듯이. –