Popoverviewcontroller在不同位置显示方向时。
在定位之前
迎新之后
代码如下!
-(void)brushType:(id)sender{
brushTypeController = [[BrushTypeViewController alloc]init];
UINavigationController *navigationCtr = [[UINavigationController alloc]initWithRootViewController:brushTypeController];
brushTypePopOver =[[UIPopoverController alloc]initWithContentViewController:navigationCtr];
[brushTypePopOver presentPopoverFromRect:CGRectMake(0, 10, 30, 20) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
brushTypeController.contentSizeForViewInPopover =CGSizeMake (400, 200);
[navigationCtr release];
}