ipad和iphone使用UIAlertViewController
1 2 3 4 5 6 7 8 9 10 11
| id aController; if(DKDeviceiPad){ alertC.modalPresentationStyle = UIModalPresentationPopover; UIPopoverPresentationController *popPc = alertC.popoverPresentationController; popPc.barButtonItem = self.downloadItem; popPc.permittedArrowDirections = UIPopoverArrowDirectionAny; aController = alertC; }else{ aController = alertC; } [window.rootViewController presentViewController:aController animated:YES completion:nil];
|