UIPopoverController for iPhone

岁酱吖の 提交于 2020-01-15 12:23:14

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!