0
UIPopoverController
のサイズを両方の向きのIPadスクリーンのサイズと同じにしたい。どうやってするか?IPadのUIPopoverControllerを画面サイズと同じにする
UIPopoverController
のサイズを両方の向きのIPadスクリーンのサイズと同じにしたい。どうやってするか?IPadのUIPopoverControllerを画面サイズと同じにする
CGRect popoverRect = [self.view convertRect:[btn frame]
fromView:[btn superview]];
popoverRect.size.width = self.view.frame.size.width;
popoverRect.origin.x = popoverRect.origin.x+150;
popoverRect.size.height = self.view.frame.size.width;
[self.popoverController
presentPopoverFromRect:popoverRect
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionLeft
animated:YES];
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
self.contentSizeForViewInPopover = CGSizeMake(width,height);}
これは、あなたがこれが動作していないポップオーバーコントローラ
に設定する必要がどのビューに設定されています。それは画面のサイズを取っていません。 – Nitish
popovercontrollerを作成するコードを投稿できますか – Hiren