단계는 다음과 같아야합니다
당신의 선택 도구를 만듭니다.
clearColor 배경으로 빈보기를 만듭니다.
은 addSubview 사용하여 텍스트 필드를 추가 뷰에 2 단계에서
설정 cameraOverlayView을
당신의 선택 도구를 제시 2 단계에서 만든보기로. 코드에서
은 : 그것은, 일부 오타가 희망이 도움이 수 있도록
//self.picker and self.textField being your UIImagePickerController and UITextField instances.
emptyView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; //This frame will make it fullscreen...
emptyView.backgroundColor = [UIColor clearColor];
[emptyView setAlpha:1.0]; //I think it is not necessary, but it wont hurt to add this line.
self.textField.frame = CGRectMake(100, 100, self.textField.frame.size.width, self.textField.frame.size.height); //Here you can specify the position in this case 100x 100y of your textField preserving the width and height.
[emptyView addSubview:self.textField];
self.picker.cameraOverlayView = emptyView; //Which by the way is not empty any more..
[emptyView release];
[self presentModalViewController:self.picker animated:YES];
[self.picker release];
나는 여기에 자신의 코드를 입력!
굉장한 사람! 매력처럼 일했다. "transparentColor"를 "clearColor"로 변경해야했습니다. – Louie
모든 사람이 사용할 수 있도록 코드가 업데이트되었습니다. –