转载自:http://blog.csdn.net/like7xiaoben/article/details/8465237 //先设定sourceType为相机,然后判断相机是否可用(ipod)没相机,不可用将sourceType设定为相片库 UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypeCamera; // if (![UIImagePickerController isSo
清单文件中增加对应权限,动态申请权限(此部分请参考Android 动态申请权限,在此不作为重点描述) private static final int REQUEST_CODE_ALBUM = 100;//打开相册private static final int REQUEST_CODE_CAMERA = 101;//打开相机 //调用相册private void openAlbum(){ Intent intent = new Intent(Intent.ACTION_GET_CONTENT)