を、これは役立つかもしれない。 あなたはヘッダにpopOverControllerを宣言する必要がその財産作るだけでなく、それを合成
if([self.popOverController isPopoverVisible])
{
[self.popOverController dismissPopoverAnimated:YES];
return;
}
UINavigationController *favNav = [[UINavigationController alloc]
initWithRootViewController:favoritesView];
//favoritesView is an outlet to the VC Favorites
//make a nav controller with the root view an outlet to the view you want to present.
self.popOverController = [[[UIPopoverController alloc]
initWithContentViewController:favNav] autorelease];
[popOverController presentPopoverFromBarButtonItem:revealFavorites permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; //revealFavorites is the button i press to show the favorites popover
favoritesView.view.frame = CGRectMake(10, 10, 310, 320); //set the frame
if (![self.popOverController isPopoverVisible]) {
[favNav release];
}
}
あなたはUIPopoverConttollerを使用していますが、これはiPad専用です... iPhone用に類似のものを作りたいと思います。しかし、私はいつも同じ位置に見えるようにしたい。 – Urkman
あなたはモーダルビューのような意味ですか? –