2015-03-22 13 views
6

Tercih edilen bir eylem sayfası olan bir UIToolbar'dan bir UIAlertController kullanan kullanıcıya seçenekler listesi sunuyorum. sunulduğunda, popover en ok kesiliyor ve köşeleri iki farklı yarıçapta yuvarlanır:UIAlertController'ın popover'i deforme oldu

Deformed UIAlertController popover

Ben sunmak için kullanıyorum kod bildiğim kadarıyla gördüğüm kadarıyla, düz belgelerinden geçerli:

UIAlertController *alertController = 
    [UIAlertController alertControllerWithTitle:@"" 
             message:@"" 
           preferredStyle:UIAlertControllerStyleActionSheet]; 
NSArray *actions = @[ 
    [UIAlertAction actionWithTitle:@"Take a Photo" 
          style:UIAlertActionStyleDefault 
          handler:^(UIAlertAction *action) {}], 
    [UIAlertAction actionWithTitle:@"Choose from Album" 
          style:UIAlertActionStyleDefault 
          handler:^(UIAlertAction *action) {}], 
    [UIAlertAction actionWithTitle:@"Cancel" 
          style:UIAlertActionStyleCancel 
          handler:^(UIAlertAction *action) {}] 
]; 
for (UIAlertAction *action in actions) { 
    [alertController addAction:action]; 
} 

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { 
    alertController.modalPresentationStyle = UIModalPresentationPopover; 
    alertController.popoverPresentationController.barButtonItem = myBarButtonItem; 
} 
[self presentViewController:alertController animated:YES completion:nil]; 

Bu bilinen bir hata mı? IOS 8.2'de fiziksel bir iPad'i ve iOS 8.1 ve 8.2'deki simülatörü denedim.

+0

. Üzerinde herhangi bir ilerleme kaydettin mi? – devios1

+0

'nil' ile' @ ''' değiştirirseniz ne olur? – SpaceDog

cevap

0

Açık olan permrowArrowDirections değerini ayarlamayı deneyin. Swift Örneğin

: bu çok sorun yaşıyorum

actionSheet.popoverPresentationController?.permittedArrowDirections = UIPopoverArrowDirection.Down; 
+0

Gerçekten sorununuzu yeniden üretebildim ve aygıtın yönünü değiştirdikten sonra özgün yönlendirmeye geri döndükten sonra oluştu. –