में एक्शन शीट पॉपओवर तीर बदलें मैं UIAlertController
का उपयोग कर रहा हूं। लेकिन आईओएस 8 के साथ आईपैड पर, एक्शनशीट पॉपओवर तीर के साथ दिखाता है। उस तीर को छिपाने के लिए कोई विचार?आईओएस 8
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"this is alert controller" message:@"yeah" preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *cancelAction = [UIAlertAction
actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel action")
style:UIAlertActionStyleCancel
handler:^(UIAlertAction *action)
{
NSLog(@"Cancel action");
}];
UIAlertAction *okAction = [UIAlertAction
actionWithTitle:NSLocalizedString(@"OK", @"OK action")
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action)
{
NSLog(@"OK action");
}];
UIAlertAction *deleteAction = [UIAlertAction
actionWithTitle:NSLocalizedString(@"Delete", @"Delete action")
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction *action) {
NSLog(@"Delete action");
}];
[alertController addAction:cancelAction];
[alertController addAction:okAction];
[alertController addAction:deleteAction];
UIPopoverPresentationController *popover = alertController.popoverPresentationController;
if (popover) {
popover.sourceView = self.view;
popover.sourceRect = self.view.bounds;
popover.permittedArrowDirections = UIPopoverArrowDirectionUnknown;
}
[self presentViewController:alertController animated:YES completion:nil];
http://stackoverflow.com/questions/:
या, आप रोटेशन घटनाओं का उपयोग नहीं करना चाहते हैं तो आपको
popoverPresentationController
प्रतिनिधि विधि पॉपओवर स्थान बदलने के लिए उपयोग कर सकते हैं 4755786/कैसे-से-निकालें-आईपैड-पॉपओवर-तीर-और-इसकी-फ्रेम-सीमा – Alfaका उपयोग करें [चेतावनी नियंत्रकएक्शनशीट.popoverPresentationController setPermittedArrowDirections: 0]; – Jageen