弹出自定义显示大小的UIViewController

  1. EditHeadViewController *editHead = [[[EditHeadViewController alloc] init] autorelease];  

  2.     //设置待显示控制器的范围  
  3.     [editHead.view setFrame:CGRectMake(00173108)];  

  4.     //设置待显示控制器视图的尺寸  
  5.     editHead.contentSizeForViewInPopover = CGSizeMake(173108);  
  6.       
  7.     UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:editHead];
  8.   
  9.     self.editPopoverController = popover;  

  10.     //设置弹出窗口尺寸  
  11.     self.editPopoverController.popoverContentSize = CGSizeMake(173108);  

  12.     [self.editPopoverController presentPopoverFromRect:CGRectMake(0200173108) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; 
  13.  
  14.     [popover release];  

你可能感兴趣的:(弹出自定义显示大小的UIViewController)