iphone - UIImagePickerController : How do I add button and select photo
<p><p> <img src="/image/qsb53.png" alt="enter image description here"/> </p>
<p>如何添加按钮并选择照片。请帮忙告诉我如何解决</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>您需要创建一个 CustomOverlayView。然后像这样配置你的选择器:</p>
<pre><code> overlay = [initWithFrame:self.view.bounds];
overlay.delegate = self;
picker = [init];
picker.delegate = self;
picker.navigationBarHidden = YES;
picker.toolbarHidden = YES;
picker.wantsFullScreenLayout = YES;
picker.allowsEditing = YES;
if (){
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
}
else{
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
}
picker.showsCameraControls = NO;
picker.cameraOverlayView = overlay;
</code></pre></p>
<p style="font-size: 20px;">关于iphone - UIImagePickerController : How do I add button and select photo,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/16717992/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/16717992/
</a>
</p>
页:
[1]