我正在 Ipad 中制作应用程序我在 Xib 中使用了一个 pickerviewController,当用户单击特定按钮时我会显示它现在我试图将该选择器视图放在弹出窗口中这就是我试图实现这种品味的方式
pickerView.hidden=FALSE;
i have created outlet of picker and i unhide it here
UIViewController* popoverContent = [[UIViewController alloc] init];
UIView* popoverView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 344)];
popoverView.backgroundColor = [UIColor whiteColor];
[popoverView addSubview:pickerView];
popoverContent.view = popoverView;
popoverContent.contentSizeForViewInPopover = CGSizeMake(320, 244);
//create a popover controller
UIPopoverController *popoverController = [[UIPopoverController alloc] initWithContentViewController:popoverContent];
CGRect popoverRect;
popoverRect.origin.x =323;
popoverRect.origin.y = 713;
popoverRect.size.height = 215;
popoverRect.size.width = 70;
[popoverController presentPopoverFromRect:popoverRect
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionDown
animated:YES];
//release the popover content
[popoverView release];
[popoverContent release];
现在的问题是我的弹出窗口正在显示,但它完全是黑色的我正在努力解决这个问题请告诉我我做错了什么或更正代码谢谢你的帮助