这是基于我在这里提出的问题,我已经取得了很好的进展:
custom uitableviewcell will not display label texts
我基本上遵循了为我提供的教程。
http://brianflove.com/2012/12/10/how-to-create-an-ipad-popover-view/
问题
现在我的问题是,我必须动态生成我的ui栏按钮,好像我只是将它拖放到故事板上我只限于左侧的一个和右侧的一个。这是我生成按钮的代码
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
UIBarButtonItem *btn = [[UIBarButtonItem alloc] initWithTitle:@"Button" style:UIBarButtonItemStyleBordered target:self action:@selector(getMenu:)];
self.navigationItem.leftBarButtonItems = [[NSArray alloc] initWithObjects:btn, nil];
}
根据该教程,我需要使用segue来弹出我需要的uitableview
。但这需要我有一个锚点,如此
所以我的问题是,如何为UIBarButtonItem
添加锚点?我一直在寻找,我一直在寻找有关创建自定义popover类的东西?这准确吗?
答案 0 :(得分:0)
我通过在导航栏上创建一个不可见的UIView来解决这个问题,然后将其用作segue的锚点。当uiviewcontroller被显示时,弹出的“箭头”的问题是笨拙地放置。仍在努力解决这个问题。
这是我从
得到答案的地方