0
您好朋友我想在點擊彈出視圖的圖像按鈕後打開imagepicker視圖。現在重點是沒有彈出窗口完美的工作。但我不知道如何在調制解調器彈出窗口中實現它。我怎麼能夠 ?UIImagePickerController通過iPhone中的彈出窗口模型
您好朋友我想在點擊彈出視圖的圖像按鈕後打開imagepicker視圖。現在重點是沒有彈出窗口完美的工作。但我不知道如何在調制解調器彈出窗口中實現它。我怎麼能夠 ?UIImagePickerController通過iPhone中的彈出窗口模型
//試試這個。
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
imagePickerController_.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[popover_ presentPopoverFromRect:[sender bounds] inView:sender
permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
...
}
這裏發送者是您單擊// UIButton的
對象這可能有助於你
-(IBAction)Click_event
{
UIImagePickerController *imagePickerController_=[[UIImagePickerController alloc] init];
UIPopoverController *popover_=[[UIPopoverController alloc]
initWithContentViewController:imagePickerController_];
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
imagePickerController_.sourceType =UIImagePickerControllerSourceTypePhotoLibrary;
[popover_ presentPopoverFromRect:CGRectMake(400, 400, 0, 0) inView:self.Mybutton
permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
}
請張貼代碼,並清楚你想要什麼。目前您的問題包含難以理解的混淆信息 – 2012-04-03 11:30:22