UIPopoverController for iPhone

2019-07-31 10:47发布

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

2条回答
女痞
2楼-- · 2019-07-31 11:34

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

查看更多
可以哭但决不认输i
3楼-- · 2019-07-31 11:42
  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 .

查看更多
登录 后发表回答