私はiPadアプリを作成しましたが、横向きでも縦向きでも問題なく動作します。アプリを回転させて横向きにする場合を除いて、ポップオーバーの位置が正しくありません。if
擬似コードのようなステートメントを追加する方法はありますか?
if in portrait CGRect
use size S1 location L1
else if in landscape CGRect
use size S2 location L2
私のコード:
UIPopoverController* popover = [[UIPopoverController alloc] initWithContentViewController:TweetFeed];
[popover setDelegate:self];
[popover presentPopoverFromRect:CGRectMake(401, 401, 220, 300) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES];
[popover setPopoverContentSize:CGSizeMake(320, 150)];