Revision: 42408
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 4, 2011 12:38 by streamt
Initial Code
- (void)loadView
{
PurchaseWindowViewController* vc = [[PurchaseWindowViewController alloc] initWithNibName:@"PurchaseWindowViewController" bundle:nil];
pc = [[UIPopoverController alloc] initWithContentViewController:vc];
CGRect rect = CGRectMake((self.view.bounds.size.width - 300)/2, (self.view.bounds.size.height - 400)/2, 300, 400);
pc.popoverContentSize = rect.size;
[pc presentPopoverFromRect:rect inView:self.view permittedArrowDirections:0 animated:YES];
[super viewDidLoad];
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
CGRect rect = CGRectMake((self.view.bounds.size.width - 300)/2, (self.view.bounds.size.height - 400)/2, 300, 400);
pc.popoverContentSize = rect.size;
}
Initial URL
Initial Description
Initial Title
Show UIPopoverController
Initial Tags
c, iphone
Initial Language
Objective C