问题
Does anyone know of how I would go about creating a UIPopoverController like the one found in Tweetbot form Tapbots? For months I have been trying to figure this out and gave up thinking it wasn't possible. When Tweetbot received an update with this, it made realize it is possible but I still can't seem to figure it out. Does anyone know of classes I could download that has an identical UIPopover?
Thanks
Edit: http://d.pr/LPI9
回答1:
Popover controllers are for use exclusively on iPad devices. Attempting to create one on other devices results in an exception.
If you need custom popOverController check this link Custom uipopovercontroller for iPhone
回答2:
TestTableViewController *vc = [[TestTableViewController alloc]initWithStyle:UITableViewStylePlain];
[self addChildViewController:vc];
[self.view addSubview:vc.view];
[self.view bringSubviewToFront:vc.view];
[vc.view setFrame:CGRectMake(20, 20, 100, 200)];
You can create a child view as uipopviewcontroller , beware not add childview on a scrollview , otherwise the scroll effect vanishes .
来源:https://stackoverflow.com/questions/6798550/uipopovercontroller-for-iphone