我想在自定义框架中添加UIImagePickerController,所以一直在关注添加UIImagePickerController视图作为子视图的一些帖子。
几个问题:
非常感谢提前!
我的代码:
self.imagePicker = [[UIImagePickerController alloc] init];
self.imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
self.imagePicker.delegate = self;
//This is a subview of self.view.
[self.pickerControllerHolderView addSubview:self.imagePicker.view];
// This seems to adjust the size of the view, but squashes the view.
// self.pickerControllerHolderView.transform = CGAffineTransformMakeScale(1, 0.5);
答案 0 :(得分:1)
此类的内部是私有的,并不打算作为子视图添加。它是一个独立的视图控制器和导航控制器,很可能无法按预期运行。如果您需要自定义UI来挑选照片,则应访问ALAssetsLibrary
并自行显示内容。