在方向时使用IOS PopOverViewController的问题

时间:2012-01-30 05:41:51

标签: objective-c ipad

Popoverviewcontroller在不同位置显示方向时。

在定位之前

enter image description here

迎新之后 enter image description here

代码如下!

-(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];

}

0 个答案:

没有答案