gpt4 book ai didi

iphone - UIImagePickerController iPad 问题

转载 作者:太空狗 更新时间:2023-10-30 03:28:21 26 4
gpt4 key购买 nike

我有以下代码:

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] initWithRootViewController:self];
imagePicker.delegate = self;

popover = [[UIPopoverController alloc] initWithContentViewController:imagePicker];
[imagePicker release];
[popover presentPopoverFromRect:CGRectMake(100, 100.0, 0.0, 0.0)
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];

但这只会破坏 self.view 而不会显示任何内容。当我将 inView: 设置为 [self.view window] 时,选择器至少会出现。但它仍然删除了 self.view。我必须怎么做才能使 View 不消失?

最佳答案

您正在错误地初始化 UIImagePickerController。尝试将其更改为

[[UIImagePickerController alloc] init]

关于iphone - UIImagePickerController iPad 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3361632/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com