弹出自定义显示大小的UIViewController

EditHeadViewController *editHead = [[[EditHeadViewController alloc] init] autorelease];  
    //设置待显示控制器的范围  
    [editHead.view setFrame:CGRectMake(0, 0, 173, 108)];  
    //设置待显示控制器视图的尺寸  
    editHead.contentSizeForViewInPopover = CGSizeMake(173, 108);  
      
    UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:editHead];  
    self.editPopoverController = popover;  
    //设置弹出窗口尺寸  
    self.editPopoverController.popoverContentSize = CGSizeMake(173, 108);  
    [self.editPopoverController presentPopoverFromRect:CGRectMake(0, 200, 173, 108) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];  
    [popover release];  



原文:http://southking.iteye.com/blog/1535008

你可能感兴趣的:(ios)