在社区应用程序开发中,我的任务是将iPhone应用程序制作成iPad应用程序.
if(UI_USER_INTERFACE_IdioM() == UIUserInterfaceIdiomPad) { self.imagePickerController = [[UIImagePickerController alloc] init]; self.imagePickerController.delegate = self; self.imagePickerController.sourceType = sourceType; if (sourceType == UIImagePickerControllerSourceTypeCamera) { if ([UIImagePickerController isCameraDeviceAvailable:UIImagePickerControllerCameraDeviceFront]) { self.imagePickerController.cameraDevice = UIImagePickerControllerCameraDeviceFront; } self.imagePickerController.allowsEditing = YES; self.imagePickerController.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto; } popover = [[UIPopoverController alloc] initWithContentViewController:self.imagePickerController]; [popover presentPopoverFromRect:self.profilePicture.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; return; }
但是当它产生时,我会得到这个恼人的“额外幽灵”相机按钮……
它不起作用,似乎只是嘲笑我.
如果我要求对象隐藏其输入按钮,则所有按钮都会消失.我认为没办法告诉那个特定的按钮.
UPDATE
我发现它只是第一次出现.如果我关闭并重新打开弹出窗口,它就消失了……