테이블 셀을 선택하면 사진 라이브러리에서 이미지를 선택하거나 새 이미지를 가져와야합니다.iOS - UITableView를 통해 UIImagePicker를 표시하려면 어떻게해야하나요?
화면 구조는 다음과 같습니다 셀을 터치하면
UITabBar -> UINavigationController -> ParentController -> MyController
MyController
이를 달성하기 위해 코드는
- (void)showPhotoMenu
{
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Take Photo", @"Choose From Library", nil];
[actionSheet showInView:self.view];
} else {
[self choosePhotoFromLibrary];
}
}
, 나는 도서관에서 선택하거나 사진만을 취할 수있는 옵션을 얻을 그 후에 일어나는 것 같다. 로그 출력은
Presenting action sheet clipped by its superview. Some controls might not respond to touches. On iPhone try -[UIActionSheet showFromTabBar:] or -[UIActionSheet showFromToolbar:] instead of -[UIActionSheet showInView:].
을 보여줍니다하지만 난 ImagePicker 화면 (사진 라이브러리 또는 카메라)이 표시되지 않습니다 그 이유는 확실하지 않다.
내가 수집 한 것으로부터, 탭 바를 포함하고 있기 때문에 취소 버튼에 액세스 할 수 없다는 경고가 나옵니까?
내가 어디에서 잘못 될지 조언 해 줄 사람이 있습니까?
Firs off,'UIActionSheet'에 대한 해결책은 오류이며'UIImagePickerController'를 표시하는 코드는 어디에 있습니까? – rckoenes
당신이 imagePickerController를 어떻게 보여주고 있는지 보여줍니다 .. – vishy