iPad UIImagePicker相机教程
我正在寻找一个关于谷歌的完整教程,以及一个关于使用UIImagePicker在iPad 2上从相机获取图片和从库或相机卷获取图片的完整示例堆栈 我发现一些代码片段说只是添加了PopOverController,但还没有成功实现它iPad UIImagePicker相机教程,ipad,ios4,camera,uiimagepickercontroller,Ipad,Ios4,Camera,Uiimagepickercontroller,我正在寻找一个关于谷歌的完整教程,以及一个关于使用UIImagePicker在iPad 2上从相机获取图片和从库或相机卷获取图片的完整示例堆栈 我发现一些代码片段说只是添加了PopOverController,但还没有成功实现它 提前感谢。为我工作。我这样做,我检测到iPhone或iPad以及popover中显示(self.album.bounds)的位置(self.album)是否只是您希望popover箭头出现在本例中self.album是触发以下操作的按钮 -(IBAction)selec
提前感谢。为我工作。我这样做,我检测到iPhone或iPad以及popover中显示(self.album.bounds)的位置(self.album)是否只是您希望popover箭头出现在本例中self.album是触发以下操作的按钮
-(IBAction)selectPicture:(id)sender {
NSLog(@"Image is not set");
// Create image picker controller
thePicker = [[UIImagePickerController alloc] init];
// Set source to the camer roll;
thePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
// Delegate to self
thePicker.delegate = self;
//Allow editing of image NO
thePicker.allowsEditing = NO;
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
[self presentModalViewController:thePicker animated:YES];
}
else{
popover = [[UIPopoverController alloc]initWithContentViewController:thePicker];
[popover presentPopoverFromRect:self.album.bounds inView:self.album permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
popover = popover;
}
}