简体   繁体   English

通过单击iPhone应用程序中的表格视图单元来打开相机

[英]Open a camera by clicking on the table view cell in iphone app

如何通过单击iPhone应用程序中的表格视图单元来打开相机?

Use the didSelectRowAtIndexPath method in your table view delegate class. 在表视图委托类中使用didSelectRowAtIndexPath方法。 Instantiate a UIImagePickerController to show the camera, or photo selection dialog. 实例化UIImagePickerController以显示相机或照片选择对话框。

Make sure you call deselectRowAtIndexPath during the method call to deselect the row properly and comply with the UI guidelines. 确保在方法调用期间调用deselectRowAtIndexPath以正确地取消选择该行并符合UI准则。

看一下文档中的UITableView委托方法和UIImagePickerController。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM