0

enter image description here

I have UIPopoverController

    UINavigationController *navVC = [[[UINavigationController alloc] initWithRootViewController:loginVC] autorelease];

    navVC.modalInPopover = YES;
    navVC.modalPresentationStyle = UIModalPresentationCurrentContext;    


    _popoverLoginVC = [[UIPopoverController alloc] initWithContentViewController:navVC];

And when I present popover

  [self.popoverLoginVC presentPopoverFromRect:centerFrame
                                     inView:self.splitVC.view
                   permittedArrowDirections:0 
                                   animated:YES];

It looks like it is modal (I can't close popover by tapping outside) but other area hadn't dimmed. I have played with modalPresentationStyle with no luck (

Please, advise

4

4 に答える 4

0

モーダルに設定しているため、モーダルです。

navVC.modalInPopover = YES;

それを削除するだけで、私があなたを正しく理解していれば問題ありません。

于 2012-04-18T09:47:16.293 に答える
0
permittedArrowDirections:0

これはこのパラメーターの有効な値ではなく、未定義の動作になります (少なくとも iOS >= 6 では)。次のいずれかを指定する必要があります。

UIPopoverArrowDirectionUp = 1UL << 0,
UIPopoverArrowDirectionDown = 1UL << 1,
UIPopoverArrowDirectionLeft = 1UL << 2,
UIPopoverArrowDirectionRight = 1UL << 3,
UIPopoverArrowDirectionAny = UIPopoverArrowDirectionUp | UIPopoverArrowDirectionDown | UIPopoverArrowDirectionLeft | UIPopoverArrowDirectionRight,

残念ながら、「矢印なし」はサポートされていないオプションです。:(

于 2013-08-14T21:07:53.223 に答える
0

ポップオーバーは、たとえモーダルで表示されたとしても、「背景」ビューを薄暗くすることを意図したものではありません (指定することもできません)。

于 2012-08-02T13:23:19.850 に答える
0

線を取り除く

navVC.modalInPopover = はい;

navVC.modalPresentationStyle = UIModalPresentationCurrentContext;

于 2012-04-18T09:48:05.477 に答える